Read data from the stream made by D4StreamMarshaller.
More...
#include <D4StreamUnMarshaller.h>
|
| D4StreamUnMarshaller (istream &in) |
|
| D4StreamUnMarshaller (istream &in, bool twiddle_bytes) |
| Build a DAP4 Stream unMarshaller.
|
|
virtual void | dump (ostream &strm) const |
| dump the contents of this object to the specified ostream
|
|
virtual void | get_byte (dods_byte &val) |
|
Crc32::checksum | get_checksum () |
|
string | get_checksum_str () |
|
int64_t | get_count () |
|
virtual void | get_float32 (dods_float32 &val) |
|
virtual void | get_float64 (dods_float64 &val) |
|
virtual void | get_int (int &) |
|
virtual void | get_int16 (dods_int16 &val) |
|
virtual void | get_int32 (dods_int32 &val) |
|
virtual void | get_int64 (dods_int64 &val) |
|
virtual void | get_int8 (dods_int8 &val) |
|
virtual void | get_opaque (char *, unsigned int) |
|
virtual void | get_opaque_dap4 (char **val, int64_t &len) |
|
virtual void | get_opaque_dap4 (vector< uint8_t > &val) |
|
virtual void | get_str (string &val) |
|
virtual void | get_uint16 (dods_uint16 &val) |
|
virtual void | get_uint32 (dods_uint32 &val) |
|
virtual void | get_uint64 (dods_uint64 &val) |
|
virtual void | get_url (string &val) |
|
virtual void | get_vector (char **, unsigned int &, int, Vector &) |
|
virtual void | get_vector (char **, unsigned int &, Vector &) |
|
virtual void | get_vector (char *val, int64_t num_bytes) |
|
virtual void | get_vector (char *val, int64_t num_elem, int elem_size) |
|
virtual void | get_vector_float32 (char *val, int64_t num_elem) |
|
virtual void | get_vector_float64 (char *val, int64_t num_elem) |
|
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 CRC32 checksum is dependent on byte order.
|
|
void | set_twiddle_bytes (bool twiddle) |
|
virtual | ~D4StreamUnMarshaller () |
|
Read data from the stream made by D4StreamMarshaller.
Definition at line 65 of file D4StreamUnMarshaller.h.
◆ D4StreamUnMarshaller() [1/2]
libdap::D4StreamUnMarshaller::D4StreamUnMarshaller |
( |
istream & | in, |
|
|
bool | twiddle_bytes ) |
Build a DAP4 Stream unMarshaller.
Build a DAP4 Stream UnMarshaller initialed to read from am istream object. Figure out if the words read for values need to be 'twiddled' based on the byte-order of the stream an this host (see set_twiddle_bytes()).
- Parameters
-
in | Read from this input stream |
is_stream_bigendian | The byte order of the data in the stream |
Definition at line 59 of file D4StreamUnMarshaller.cc.
◆ D4StreamUnMarshaller() [2/2]
libdap::D4StreamUnMarshaller::D4StreamUnMarshaller |
( |
istream & | in | ) |
|
◆ ~D4StreamUnMarshaller()
libdap::D4StreamUnMarshaller::~D4StreamUnMarshaller |
( |
| ) |
|
|
virtual |
◆ dump()
void libdap::D4StreamUnMarshaller::dump |
( |
ostream & | strm | ) |
const |
|
virtual |
dump the contents of this object to the specified ostream
This method is implemented by all derived classes to dump their contents, in other words, any state they might have, private variables, etc...
- Parameters
-
strm | C++ i/o stream to dump the object to |
Implements libdap::UnMarshaller.
Definition at line 408 of file D4StreamUnMarshaller.cc.
◆ get_byte()
void libdap::D4StreamUnMarshaller::get_byte |
( |
dods_byte & | val | ) |
|
|
virtual |
◆ get_checksum()
◆ get_checksum_str()
string libdap::D4StreamUnMarshaller::get_checksum_str |
( |
| ) |
|
◆ get_count()
int64_t libdap::D4StreamUnMarshaller::get_count |
( |
| ) |
|
Read a count value from the stream. This is used with D4Sequence which needs to use various other 'get' methods to read its fields. Methods like get_opaque_dap4() handle reading their count values themselves.
- Parameters
-
count | The number of elements to follow. |
Definition at line 225 of file D4StreamUnMarshaller.cc.
◆ get_float32()
void libdap::D4StreamUnMarshaller::get_float32 |
( |
dods_float32 & | val | ) |
|
|
virtual |
◆ get_float64()
void libdap::D4StreamUnMarshaller::get_float64 |
( |
dods_float64 & | val | ) |
|
|
virtual |
◆ get_int()
virtual void libdap::D4StreamUnMarshaller::get_int |
( |
int & | | ) |
|
|
inlinevirtual |
◆ get_int16()
void libdap::D4StreamUnMarshaller::get_int16 |
( |
dods_int16 & | val | ) |
|
|
virtual |
◆ get_int32()
void libdap::D4StreamUnMarshaller::get_int32 |
( |
dods_int32 & | val | ) |
|
|
virtual |
◆ get_int64()
void libdap::D4StreamUnMarshaller::get_int64 |
( |
dods_int64 & | val | ) |
|
|
virtual |
◆ get_int8()
void libdap::D4StreamUnMarshaller::get_int8 |
( |
dods_int8 & | val | ) |
|
|
virtual |
◆ get_opaque()
virtual void libdap::D4StreamUnMarshaller::get_opaque |
( |
char * | , |
|
|
unsigned int | ) |
|
inlinevirtual |
◆ get_opaque_dap4() [1/2]
void libdap::D4StreamUnMarshaller::get_opaque_dap4 |
( |
char ** | val, |
|
|
int64_t & | len ) |
|
virtual |
Get opaque data when the size of the data to be read is not known in advance.
- Parameters
-
val | Value-result parameter for the data; caller must delete. |
len | value-result parameter for the length of the data |
Definition at line 238 of file D4StreamUnMarshaller.cc.
◆ get_opaque_dap4() [2/2]
void libdap::D4StreamUnMarshaller::get_opaque_dap4 |
( |
vector< uint8_t > & | val | ) |
|
|
virtual |
◆ get_str()
void libdap::D4StreamUnMarshaller::get_str |
( |
string & | val | ) |
|
|
virtual |
◆ get_uint16()
void libdap::D4StreamUnMarshaller::get_uint16 |
( |
dods_uint16 & | val | ) |
|
|
virtual |
◆ get_uint32()
void libdap::D4StreamUnMarshaller::get_uint32 |
( |
dods_uint32 & | val | ) |
|
|
virtual |
◆ get_uint64()
void libdap::D4StreamUnMarshaller::get_uint64 |
( |
dods_uint64 & | val | ) |
|
|
virtual |
◆ get_url()
void libdap::D4StreamUnMarshaller::get_url |
( |
string & | val | ) |
|
|
virtual |
◆ get_vector() [1/4]
virtual void libdap::D4StreamUnMarshaller::get_vector |
( |
char ** | , |
|
|
unsigned int & | , |
|
|
int | , |
|
|
Vector & | ) |
|
inlinevirtual |
◆ get_vector() [2/4]
virtual void libdap::D4StreamUnMarshaller::get_vector |
( |
char ** | , |
|
|
unsigned int & | , |
|
|
Vector & | ) |
|
inlinevirtual |
◆ get_vector() [3/4]
void libdap::D4StreamUnMarshaller::get_vector |
( |
char * | val, |
|
|
int64_t | num_bytes ) |
|
virtual |
◆ get_vector() [4/4]
void libdap::D4StreamUnMarshaller::get_vector |
( |
char * | val, |
|
|
int64_t | num_elem, |
|
|
int | elem_size ) |
|
virtual |
◆ get_vector_float32()
void libdap::D4StreamUnMarshaller::get_vector_float32 |
( |
char * | val, |
|
|
int64_t | num_elem ) |
|
virtual |
◆ get_vector_float64()
void libdap::D4StreamUnMarshaller::get_vector_float64 |
( |
char * | val, |
|
|
int64_t | num_elem ) |
|
virtual |
◆ is_source_big_endian()
bool libdap::D4StreamUnMarshaller::is_source_big_endian |
( |
| ) |
const |
|
inline |
Is the data source we are reading from a big-endian machine? We need this because the value of the CRC32 checksum is dependent on byte order.
- Note
- This is somewhat tortured logic, but if this host is big-endian and twiddle_bytes is not true, then the remote host must be big-endian. Similarly, if this host is not big-endian and twiddle_bytes is true, then the remote host must be big-endian
Definition at line 104 of file D4StreamUnMarshaller.h.
◆ set_twiddle_bytes()
void libdap::D4StreamUnMarshaller::set_twiddle_bytes |
( |
bool | twiddle | ) |
|
|
inline |
◆ c_checksum_length
const unsigned int libdap::D4StreamUnMarshaller::c_checksum_length = 4 |
|
static |
The documentation for this class was generated from the following files: