57XDRFileUnMarshaller::XDRFileUnMarshaller(FILE *out) : _source(0) { _source =
new_xdrstdio(out, XDR_DECODE); }
59XDRFileUnMarshaller::XDRFileUnMarshaller() :
UnMarshaller(), _source(0) {
60 throw InternalErr(__FILE__, __LINE__,
"Default constructor not implemented.");
63XDRFileUnMarshaller::XDRFileUnMarshaller(
const XDRFileUnMarshaller &um) : UnMarshaller(um), _source(0) {
64 throw InternalErr(__FILE__, __LINE__,
"Copy constructor not implemented.");
68 throw InternalErr(__FILE__, __LINE__,
"Copy operator not implemented.");
80 if (!xdr_char(_source, (
char *)&val))
81 throw Error(
"Network I/O Error. Could not read byte data.");
86 throw Error(
"Network I/O Error. Could not read int 16 data.");
91 throw Error(
"Network I/O Error. Could not read int 32 data.");
95 if (!xdr_float(_source, &val))
96 throw Error(
"Network I/O Error. Could not read float 32 data.");
100 if (!xdr_double(_source, &val))
101 throw Error(
"Network I/O Error.Could not read float 64 data.");
106 throw Error(
"Network I/O Error. Could not read uint 16 data.");
111 throw Error(
"Network I/O Error. Could not read uint 32 data.");
118 throw Error(
"Network I/O Error. Could not read string data.");
130 if (!xdr_int(_source, &val))
132 "Network I/O Error(1). This may be due to a bug in libdap or a\nproblem with the network connection.");
137 throw Error(
"Network I/O error (1).");
144 throw Error(
"Network I/O error (2).");
149 strm <<
DapIndent::LMarg <<
"XDRFileUnMarshaller::dump - (" << (
void *)
this <<
")" << endl;
XDR * new_xdrstdio(FILE *stream, enum xdr_op xop)
void delete_xdrstdio(XDR *xdr)
The basic data type for the DODS DAP types.
virtual Type type() const
Returns the type of the class instance.
static ostream & LMarg(ostream &strm)
A class for error processing.
A class for software fault reporting.
abstract base class used to unmarshall/deserialize dap data objects
Holds a one-dimensional collection of DAP2 data types.
BaseType * var(const string &name="", bool exact_match=true, btp_stack *s=nullptr) override
unmarshaller that knows how to unmarshall/deserialize dap objects using XDR from a file
virtual void get_int(int &val)
virtual void get_uint16(dods_uint16 &val)
virtual void get_int32(dods_int32 &val)
virtual void get_opaque(char *val, unsigned int len)
virtual void get_float32(dods_float32 &val)
virtual void get_uint32(dods_uint32 &val)
virtual ~XDRFileUnMarshaller()
virtual void get_str(string &val)
virtual void get_vector(char **val, unsigned int &num, Vector &vec)
virtual void get_byte(dods_byte &val)
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
virtual void get_float64(dods_float64 &val)
virtual void get_url(string &val)
virtual void get_int16(dods_int16 &val)
static xdrproc_t xdr_coder(const Type &t)
Returns a function used to encode elements of an array.
top level DAP object to house generic methods
const unsigned int max_str_len