54 XDRFileMarshaller::XDRFileMarshaller( FILE *out )
60 XDRFileMarshaller::XDRFileMarshaller()
64 throw InternalErr( __FILE__, __LINE__,
"Default constructor not implemented." ) ;
71 throw InternalErr( __FILE__, __LINE__,
"Copy constructor not implemented." ) ;
77 throw InternalErr( __FILE__, __LINE__,
"Copy operator not implemented." ) ;
90 if( !xdr_char( _sink, (
char *)&val ) )
91 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.");
98 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.");
105 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.");
111 if( !xdr_float( _sink, &val ) )
112 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.");
118 if( !xdr_double( _sink, &val ) )
119 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.");
126 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.");
133 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.");
139 const char *out_tmp = val.c_str() ;
141 if( !xdr_string( _sink, (
char **)&out_tmp,
max_str_len) )
142 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.");
154 if( !xdr_opaque( _sink, val, len ) )
155 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.");
161 if( !xdr_int( _sink, &val) )
162 throw Error(
"Network I/O Error(1). This may be due to a bug in libdap or a\nproblem with the network connection.");
170 "Buffer pointer is not set.");
174 if( !xdr_bytes( _sink, (
char **)&val,
175 (
unsigned int *) &num,
178 throw Error(
"Network I/O Error(2). This may be due to a bug in libdap or a\nproblem with the network connection.");
187 "Buffer pointer is not set.");
192 if( !xdr_array( _sink, (
char **)&val,
193 (
unsigned int *) & num,
197 throw Error(
"Network I/O Error(2). This may be due to a bug in libdap or a\nproblem with the network connection.");
205 << (
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 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)
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
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
Type type() const
Returns the type of the class instance.
void delete_xdrstdio(XDR *xdr)
marshaller that knows how to marshall/serialize dap data objects to a file using 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)