libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
libdap::XDRStreamMarshaller Class Reference

Marshaller that knows how serialize dap data objects to a C++ iostream using XDR. More...

#include <XDRStreamMarshaller.h>

Inheritance diagram for libdap::XDRStreamMarshaller:
Inheritance graph
Collaboration diagram for libdap::XDRStreamMarshaller:
Collaboration graph

Public Member Functions

virtual void dump (ostream &strm) const
 dump the contents of this object to the specified ostream
 
virtual void put_byte (dods_byte val)
 
virtual void put_float32 (dods_float32 val)
 
virtual void put_float64 (dods_float64 val)
 
virtual void put_int (int val)
 
virtual void put_int16 (dods_int16 val)
 
virtual void put_int32 (dods_int32 val)
 
virtual void put_opaque (char *val, unsigned int len)
 
virtual void put_str (const string &val)
 
virtual void put_uint16 (dods_uint16 val)
 
virtual void put_uint32 (dods_uint32 val)
 
virtual void put_url (const string &val)
 
virtual void put_vector (char *val, int num, int width, Vector &vec)
 
virtual void put_vector (char *val, int num, Vector &vec)
 
virtual void put_vector_end ()
 
virtual void put_vector_part (char *val, unsigned int num, int width, Type type)
 
virtual void put_vector_start (int num)
 
 XDRStreamMarshaller (ostream &out)
 
virtual ~XDRStreamMarshaller ()
 

Friends

class MarshallerTest
 

Detailed Description

Marshaller that knows how serialize dap data objects to a C++ iostream using XDR.

Definition at line 53 of file XDRStreamMarshaller.h.

Constructor & Destructor Documentation

◆ XDRStreamMarshaller()

libdap::XDRStreamMarshaller::XDRStreamMarshaller ( ostream & out)

Build an instance of XDRStreamMarshaller. Bind the C++ stream out to this instance. If the checksum parameter is true, initialize a checksum buffer and enable the use of the reset_checksum() and get_checksum() methods.

Parameters
outWrite to this stream object.
checksumIf true, compute checksums. False by default
write_dataIf true, write data values. True by default

Definition at line 78 of file XDRStreamMarshaller.cc.

◆ ~XDRStreamMarshaller()

libdap::XDRStreamMarshaller::~XDRStreamMarshaller ( )
virtual

Definition at line 91 of file XDRStreamMarshaller.cc.

Member Function Documentation

◆ dump()

void libdap::XDRStreamMarshaller::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
strmC++ i/o stream to dump the object to

Implements libdap::Marshaller.

Definition at line 564 of file XDRStreamMarshaller.cc.

◆ put_byte()

void libdap::XDRStreamMarshaller::put_byte ( dods_byte val)
virtual

Implements libdap::Marshaller.

Definition at line 100 of file XDRStreamMarshaller.cc.

◆ put_float32()

void libdap::XDRStreamMarshaller::put_float32 ( dods_float32 val)
virtual

Implements libdap::Marshaller.

Definition at line 154 of file XDRStreamMarshaller.cc.

◆ put_float64()

void libdap::XDRStreamMarshaller::put_float64 ( dods_float64 val)
virtual

Implements libdap::Marshaller.

Definition at line 172 of file XDRStreamMarshaller.cc.

◆ put_int()

void libdap::XDRStreamMarshaller::put_int ( int val)
virtual

Implements libdap::Marshaller.

Definition at line 282 of file XDRStreamMarshaller.cc.

◆ put_int16()

void libdap::XDRStreamMarshaller::put_int16 ( dods_int16 val)
virtual

Implements libdap::Marshaller.

Definition at line 118 of file XDRStreamMarshaller.cc.

◆ put_int32()

void libdap::XDRStreamMarshaller::put_int32 ( dods_int32 val)
virtual

Implements libdap::Marshaller.

Definition at line 136 of file XDRStreamMarshaller.cc.

◆ put_opaque()

void libdap::XDRStreamMarshaller::put_opaque ( char * val,
unsigned int len )
virtual

Implements libdap::Marshaller.

Definition at line 261 of file XDRStreamMarshaller.cc.

◆ put_str()

void libdap::XDRStreamMarshaller::put_str ( const string & val)
virtual

Implements libdap::Marshaller.

Definition at line 226 of file XDRStreamMarshaller.cc.

◆ put_uint16()

void libdap::XDRStreamMarshaller::put_uint16 ( dods_uint16 val)
virtual

Implements libdap::Marshaller.

Definition at line 190 of file XDRStreamMarshaller.cc.

◆ put_uint32()

void libdap::XDRStreamMarshaller::put_uint32 ( dods_uint32 val)
virtual

Implements libdap::Marshaller.

Definition at line 208 of file XDRStreamMarshaller.cc.

◆ put_url()

void libdap::XDRStreamMarshaller::put_url ( const string & val)
virtual

Implements libdap::Marshaller.

Definition at line 259 of file XDRStreamMarshaller.cc.

◆ put_vector() [1/2]

void libdap::XDRStreamMarshaller::put_vector ( char * val,
int num,
int width,
Vector & vec )
virtual

Implements libdap::Marshaller.

Definition at line 300 of file XDRStreamMarshaller.cc.

◆ put_vector() [2/2]

void libdap::XDRStreamMarshaller::put_vector ( char * val,
int num,
Vector & vec )
virtual

Implements libdap::Marshaller.

Definition at line 346 of file XDRStreamMarshaller.cc.

◆ put_vector_end()

void libdap::XDRStreamMarshaller::put_vector_end ( )
virtual

Close a vector when its values are written using put_vector_part().

See also
put_vector_start()
put_vector_part()

Reimplemented from libdap::Marshaller.

Definition at line 324 of file XDRStreamMarshaller.cc.

◆ put_vector_part()

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

Write num values for an Array/Vector.

Parameters
valThe values to write
numthe number of values to write
widthThe width of the values
typeThe DAP2 type of the values.
See also
put_vector_start()
put_vector_end()

Reimplemented from libdap::Marshaller.

Definition at line 466 of file XDRStreamMarshaller.cc.

◆ put_vector_start()

void libdap::XDRStreamMarshaller::put_vector_start ( int num)
virtual

Prepare to send a single array/vector using a series of 'put' calls.

Parameters
numThe number of elements in the Array/Vector
See also
put_vector_part()
put_vector_end()

Reimplemented from libdap::Marshaller.

Definition at line 311 of file XDRStreamMarshaller.cc.

Friends And Related Symbol Documentation

◆ MarshallerTest

friend class MarshallerTest
friend

Definition at line 69 of file XDRStreamMarshaller.h.


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