56 XDRFileMarshaller::XDRFileMarshaller( FILE *out )
62 XDRFileMarshaller::XDRFileMarshaller()
66 throw InternalErr( __FILE__, __LINE__,
"Default constructor not implemented." ) ;
69 XDRFileMarshaller::XDRFileMarshaller(
const XDRFileMarshaller &m )
73 throw InternalErr( __FILE__, __LINE__,
"Copy constructor not implemented." ) ;
77 XDRFileMarshaller::operator=(
const XDRFileMarshaller & )
79 throw InternalErr( __FILE__, __LINE__,
"Copy operator not implemented." ) ;
92 if( !xdr_char( _sink, (
char *)&val ) )
93 throw Error(
"Network I/O Error. Could not send byte data.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
100 throw Error(
"Network I/O Error. Could not send int 16 data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
107 throw Error(
"Network I/O Error. Could not read int 32 data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
113 if( !xdr_float( _sink, &val ) )
114 throw Error(
"Network I/O Error. Could not send float 32 data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
120 if( !xdr_double( _sink, &val ) )
121 throw Error(
"Network I/O Error. Could not send float 64 data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
128 throw Error(
"Network I/O Error. Could not send uint 16 data. This may be due to a\nbug in libdap or a problem with the network connection.");
135 throw Error(
"Network I/O Error. Could not send uint 32 data. This may be due to a\nbug in libdap or a problem with the network connection.");
141 const char *out_tmp = val.c_str() ;
143 if( !xdr_string( _sink, (
char **)&out_tmp,
max_str_len) )
144 throw Error(
"Network I/O Error. Could not send string data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
156 if( !xdr_opaque( _sink, val, len ) )
157 throw Error(
"Network I/O Error. Could not send opaque data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
163 if( !xdr_int( _sink, &val) )
164 throw Error(
"Network I/O Error(1). This may be due to a bug in libdap or a\nproblem with the network connection.");
172 "Buffer pointer is not set.");
176 if( !xdr_bytes( _sink, (
char **)&val,
177 (
unsigned int *) &num,
180 throw Error(
"Network I/O Error(2). This may be due to a bug in libdap or a\nproblem with the network connection.");
189 "Buffer pointer is not set.");
194 if( !xdr_array( _sink, (
char **)&val,
195 (
unsigned int *) & num,
199 throw Error(
"Network I/O Error(2). This may be due to a bug in libdap or a\nproblem with the network connection.");
207 << (
void *)
this <<
")" << endl ;
virtual ~XDRFileMarshaller()
Holds a one-dimensional collection of DAP2 data types.
virtual void put_opaque(char *val, unsigned int len)
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
virtual void put_uint16(dods_uint16 val)
virtual void put_float32(dods_float32 val)
virtual void put_str(const string &val)
XDR * new_xdrstdio(FILE *stream, enum xdr_op xop)
virtual void put_vector(char *val, int num, Vector &vec)
Type type() const
Returns the type of the class instance.
A class for software fault reporting.
virtual BaseType * var(const string &name="", bool exact_match=true, btp_stack *s=0)
virtual void put_int(int val)
virtual void put_uint32(dods_uint32 val)
const unsigned int max_str_len
void delete_xdrstdio(XDR *xdr)
static ostream & LMarg(ostream &strm)
The basic data type for the DODS DAP types.
virtual void put_float64(dods_float64 val)
virtual void put_byte(dods_byte val)
abstract base class used to marshal/serialize dap data objects
virtual void put_int32(dods_int32 val)
virtual void put_int16(dods_int16 val)
static xdrproc_t xdr_coder(const Type &t)
Returns a function used to encode elements of an array.
A class for error processing.
virtual void put_url(const string &val)