bes  Updated for version 3.20.6
CacheMarshaller Class Reference

Marshaller that knows how serialize dap data objects to a disk cache This class can be used with libdap::BaseType::serialize() to write out data values. Unlike the XDR-based code used with DAP2, this does not translate data to network byte order and thus eliminates copy and memory allocation operations. More...

#include <CacheMarshaller.h>

Collaboration diagram for CacheMarshaller:
Collaboration graph

Public Member Functions

 CacheMarshaller (ostream &out)
 
virtual void dump (ostream &strm) const
 
virtual void put_byte (libdap::dods_byte val)
 
virtual void put_float32 (libdap::dods_float32 val)
 
virtual void put_float64 (libdap::dods_float64 val)
 
virtual void put_int (int val)
 
virtual void put_int16 (libdap::dods_int16 val)
 
virtual void put_int32 (libdap::dods_int32 val)
 
virtual void put_opaque (char *val, unsigned int len)
 
virtual void put_str (const string &val)
 
virtual void put_uint16 (libdap::dods_uint16 val)
 
virtual void put_uint32 (libdap::dods_uint32 val)
 
virtual void put_url (const string &val)
 
virtual void put_vector (char *val, int num, int width, libdap::Vector &)
 
virtual void put_vector (char *val, int num, libdap::Vector &)
 
virtual void put_vector_end ()
 
virtual void put_vector_part (char *val, unsigned int num, int width, libdap::Type)
 
virtual void put_vector_start (int num)
 

Detailed Description

Marshaller that knows how serialize dap data objects to a disk cache This class can be used with libdap::BaseType::serialize() to write out data values. Unlike the XDR-based code used with DAP2, this does not translate data to network byte order and thus eliminates copy and memory allocation operations.

Definition at line 42 of file CacheMarshaller.h.

Member Function Documentation

◆ put_vector_end()

void CacheMarshaller::put_vector_end ( )
virtual

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

See also
put_vector_start()
put_vector_part()

Definition at line 132 of file CacheMarshaller.cc.

◆ put_vector_part()

void CacheMarshaller::put_vector_part ( char *  val,
unsigned int  num,
int  width,
libdap::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()

Definition at line 185 of file CacheMarshaller.cc.

◆ put_vector_start()

void CacheMarshaller::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()

Definition at line 121 of file CacheMarshaller.cc.


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