27 #ifndef I_D4StreamUnMarshaller_h 28 #define I_D4StreamUnMarshaller_h 1 33 #define USE_XDR_FOR_IEEE754_ENCODING 0 35 #if USE_XDR_FOR_IEEE754_ENCODING 41 #include <rpc/types.h> 42 #include <netinet/in.h> 50 #include "dods-datatypes.h" 51 #include "UnMarshaller.h" 52 #include "InternalErr.h" 67 const static unsigned int c_checksum_length = 4;
73 #if USE_XDR_FOR_IEEE754_ENCODING 76 char d_buf[
sizeof(dods_float64)];
82 #if USE_XDR_FOR_IEEE754_ENCODING 83 void m_deserialize_reals(
char *val, int64_t num,
int width,
Type type);
85 void m_twidle_vector_elements(
char *vals, int64_t num,
int width);
92 void set_twiddle_bytes(
bool twiddle) { d_twiddle_bytes = twiddle; }
107 Crc32::checksum get_checksum();
108 string get_checksum_str();
111 virtual void get_byte(dods_byte &val);
112 virtual void get_int8(dods_int8 &val);
114 virtual void get_int16(dods_int16 &val);
115 virtual void get_int32(dods_int32 &val);
117 virtual void get_int64(dods_int64 &val);
119 virtual void get_float32(dods_float32 &val);
120 virtual void get_float64(dods_float64 &val);
122 virtual void get_uint16(dods_uint16 &val);
123 virtual void get_uint32(dods_uint32 &val);
125 virtual void get_uint64(dods_uint64 &val);
127 virtual void get_str(
string &val);
128 virtual void get_url(
string &val);
130 virtual void get_opaque(
char *,
unsigned int) {
131 throw InternalErr(__FILE__, __LINE__,
"Not implemented for DAP4, use get_opaque_dap4() instead.");
137 virtual void get_int(
int &) {
138 throw InternalErr(__FILE__, __LINE__,
"Not implemented for DAP4");
145 virtual void get_vector(
char **,
unsigned int &, Vector &) {
146 throw InternalErr(__FILE__, __LINE__,
"Not implemented for DAP4");
149 virtual void get_vector(
char **,
unsigned int &,
int, Vector & ) {
150 throw InternalErr(__FILE__, __LINE__,
"Not implemented for DAP4");
153 virtual void get_vector(
char *val, int64_t num_bytes);
154 virtual void get_vector(
char *val, int64_t num_elem,
int elem_size);
155 virtual void get_vector_float32(
char *val, int64_t num_elem);
156 virtual void get_vector_float64(
char *val, int64_t num_elem);
158 virtual void dump(ostream &strm)
const;
163 #endif // I_D4StreamUnMarshaller_h abstract base class used to unmarshall/deserialize dap data objects
bool is_source_big_endian() const
Is the data source we are reading from a big-endian machine? We need this because the value of the CR...
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
Read data from the stream made by D4StreamMarshaller.
Type
Identifies the data type.
top level DAP object to house generic methods
virtual void get_opaque_dap4(char **val, int64_t &len)
A class for software fault reporting.
bool is_host_big_endian()
Does this host use big-endian byte order?