libdap++  Updated for version 3.12.0
libdap::DAP4StreamUnMarshaller Class Reference

Read data from the stream made by DAP4StreamMarshaller.

#include <DAP4StreamUnMarshaller.h>

Inheritance diagram for libdap::DAP4StreamUnMarshaller:
Inheritance graph
Collaboration diagram for libdap::DAP4StreamUnMarshaller:
Collaboration graph

Classes

struct  checksum
 

Public Member Functions

 DAP4StreamUnMarshaller (istream &in, bool is_stream_bigendian)
 
virtual void dump (ostream &strm) const
 dump the contents of this object to the specified ostream More...
 
virtual void get_byte (dods_byte &val)
 
checksum get_checksum ()
 
string get_checksum (checksum c)
 
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 dods_uint64 get_length_prefix ()
 
virtual void get_opaque (char *val, unsigned int len)
 
virtual void get_opaque (char **val, unsigned int &len)
 
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_varying_vector (char **val, unsigned int &num)
 
virtual void get_varying_vector (char **val, unsigned int &num, int width, Type type)
 
virtual void get_vector (char **, unsigned int &, Vector &)
 
virtual void get_vector (char **, unsigned int &, int, Vector &)
 
virtual void get_vector (char *val, unsigned int num)
 
virtual void get_vector (char *val, unsigned int num, int width, Type type)
 
virtual ~DAP4StreamUnMarshaller ()
 

Static Public Attributes

static const unsigned int c_md5_length = 16
 

Detailed Description

Definition at line 46 of file DAP4StreamUnMarshaller.h.

Constructor & Destructor Documentation

libdap::DAP4StreamUnMarshaller::DAP4StreamUnMarshaller ( istream &  in,
bool  is_stream_bigendian 
)

Definition at line 67 of file DAP4StreamUnMarshaller.cc.

References DBG.

libdap::DAP4StreamUnMarshaller::~DAP4StreamUnMarshaller ( )
virtual

Definition at line 94 of file DAP4StreamUnMarshaller.cc.

Member Function Documentation

void libdap::DAP4StreamUnMarshaller::dump ( ostream &  strm) const
virtual

This method is implemented by all derived classes to dump their contents, in other words, any state they might have, private variables, etc...

The inline function below can be used to dump the contents of an OPeNDAOObj object. For example, the object Animal is derived from DapObj. A user could do the following:

Animal *a = new dog( "Sparky" ) ; cout << a << endl ;

And the dump method for dog could display the name passed into the constructor, the (this) pointer of the object, etc...

Parameters
strmC++ i/o stream to dump the object to

Implements libdap::UnMarshaller.

Definition at line 405 of file DAP4StreamUnMarshaller.cc.

References libdap::DapIndent::LMarg().

Here is the call graph for this function:

void libdap::DAP4StreamUnMarshaller::get_byte ( dods_byte val)
virtual

Implements libdap::UnMarshaller.

Definition at line 120 of file DAP4StreamUnMarshaller.cc.

DAP4StreamUnMarshaller::checksum libdap::DAP4StreamUnMarshaller::get_checksum ( )

Definition at line 98 of file DAP4StreamUnMarshaller.cc.

References c_md5_length.

string libdap::DAP4StreamUnMarshaller::get_checksum ( DAP4StreamUnMarshaller::checksum  c)

Definition at line 106 of file DAP4StreamUnMarshaller.cc.

References c_md5_length.

void libdap::DAP4StreamUnMarshaller::get_float32 ( dods_float32 val)
virtual

Implements libdap::UnMarshaller.

Definition at line 156 of file DAP4StreamUnMarshaller.cc.

void libdap::DAP4StreamUnMarshaller::get_float64 ( dods_float64 val)
virtual

Implements libdap::UnMarshaller.

Definition at line 176 of file DAP4StreamUnMarshaller.cc.

virtual void libdap::DAP4StreamUnMarshaller::get_int ( int &  )
inlinevirtual

Implements libdap::UnMarshaller.

Definition at line 114 of file DAP4StreamUnMarshaller.h.

void libdap::DAP4StreamUnMarshaller::get_int16 ( dods_int16 val)
virtual

Implements libdap::UnMarshaller.

Definition at line 132 of file DAP4StreamUnMarshaller.cc.

void libdap::DAP4StreamUnMarshaller::get_int32 ( dods_int32 val)
virtual

Implements libdap::UnMarshaller.

Definition at line 140 of file DAP4StreamUnMarshaller.cc.

void libdap::DAP4StreamUnMarshaller::get_int64 ( dods_int64 val)
virtual

Definition at line 148 of file DAP4StreamUnMarshaller.cc.

void libdap::DAP4StreamUnMarshaller::get_int8 ( dods_int8 val)
virtual

Definition at line 126 of file DAP4StreamUnMarshaller.cc.

dods_uint64 libdap::DAP4StreamUnMarshaller::get_length_prefix ( )
virtual

Read a varint (128-bit varying integer). Not the most optimized version possible. It would be better if the values were in memory and we could operate on them without a separate read for each byte.

Definition at line 223 of file DAP4StreamUnMarshaller.cc.

Referenced by get_opaque(), get_str(), and get_varying_vector().

void libdap::DAP4StreamUnMarshaller::get_opaque ( char *  val,
unsigned int  len 
)
virtual

Get opaque data when the size of the data to read is known.

Parameters
valPointer to 'len' bytes; store the data here.
lenNumber of bytes referenced adn expected
Exceptions
Errorif the number of bytes indicated in the stream does not match 'len'

Implements libdap::UnMarshaller.

Definition at line 267 of file DAP4StreamUnMarshaller.cc.

References get_length_prefix(), and libdap::long_to_string().

Referenced by get_varying_vector().

Here is the call graph for this function:

void libdap::DAP4StreamUnMarshaller::get_opaque ( char **  val,
unsigned int &  len 
)
virtual

Get opaque data when the size of the data to be read is not known in advance.

Parameters
valValue-result parameter for the data; caller must delete.
lenvalue-result parameter for the length of the data

Definition at line 285 of file DAP4StreamUnMarshaller.cc.

References get_length_prefix().

Here is the call graph for this function:

void libdap::DAP4StreamUnMarshaller::get_str ( string &  val)
virtual

Implements libdap::UnMarshaller.

Definition at line 242 of file DAP4StreamUnMarshaller.cc.

References get_length_prefix().

Referenced by get_url().

Here is the call graph for this function:

void libdap::DAP4StreamUnMarshaller::get_uint16 ( dods_uint16 val)
virtual

Implements libdap::UnMarshaller.

Definition at line 195 of file DAP4StreamUnMarshaller.cc.

void libdap::DAP4StreamUnMarshaller::get_uint32 ( dods_uint32 val)
virtual

Implements libdap::UnMarshaller.

Definition at line 203 of file DAP4StreamUnMarshaller.cc.

void libdap::DAP4StreamUnMarshaller::get_uint64 ( dods_uint64 val)
virtual

Definition at line 211 of file DAP4StreamUnMarshaller.cc.

void libdap::DAP4StreamUnMarshaller::get_url ( string &  val)
virtual

Implements libdap::UnMarshaller.

Definition at line 253 of file DAP4StreamUnMarshaller.cc.

References get_str().

Here is the call graph for this function:

void libdap::DAP4StreamUnMarshaller::get_varying_vector ( char **  val,
unsigned int &  num 
)
virtual

Definition at line 378 of file DAP4StreamUnMarshaller.cc.

References get_opaque().

Here is the call graph for this function:

void libdap::DAP4StreamUnMarshaller::get_varying_vector ( char **  val,
unsigned int &  num,
int  width,
Type  type 
)
virtual

Definition at line 384 of file DAP4StreamUnMarshaller.cc.

References libdap::dods_float32_c, libdap::dods_float64_c, and get_length_prefix().

Here is the call graph for this function:

virtual void libdap::DAP4StreamUnMarshaller::get_vector ( char **  ,
unsigned int &  ,
Vector  
)
inlinevirtual

Implements libdap::UnMarshaller.

Definition at line 124 of file DAP4StreamUnMarshaller.h.

virtual void libdap::DAP4StreamUnMarshaller::get_vector ( char **  ,
unsigned int &  ,
int  ,
Vector  
)
inlinevirtual

Implements libdap::UnMarshaller.

Definition at line 128 of file DAP4StreamUnMarshaller.h.

void libdap::DAP4StreamUnMarshaller::get_vector ( char *  val,
unsigned int  num 
)
virtual

Definition at line 294 of file DAP4StreamUnMarshaller.cc.

void libdap::DAP4StreamUnMarshaller::get_vector ( char *  val,
unsigned int  num,
int  width,
Type  type 
)
virtual

Definition at line 361 of file DAP4StreamUnMarshaller.cc.

References libdap::dods_float32_c, and libdap::dods_float64_c.

Member Data Documentation

const unsigned int libdap::DAP4StreamUnMarshaller::c_md5_length = 16
static

Definition at line 48 of file DAP4StreamUnMarshaller.h.

Referenced by get_checksum().


The documentation for this class was generated from the following files: