bes Updated for version 3.20.13
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.

Constructor & Destructor Documentation

◆ CacheMarshaller()

CacheMarshaller::CacheMarshaller ( ostream &  out)
inline

Definition at line 53 of file CacheMarshaller.h.

◆ ~CacheMarshaller()

virtual CacheMarshaller::~CacheMarshaller ( )
inlinevirtual

Definition at line 54 of file CacheMarshaller.h.

Member Function Documentation

◆ dump()

void CacheMarshaller::dump ( ostream &  strm) const
virtual

Definition at line 190 of file CacheMarshaller.cc.

◆ put_byte()

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

Definition at line 51 of file CacheMarshaller.cc.

◆ put_float32()

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

Definition at line 66 of file CacheMarshaller.cc.

◆ put_float64()

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

Definition at line 71 of file CacheMarshaller.cc.

◆ put_int()

void CacheMarshaller::put_int ( int  val)
virtual

Definition at line 103 of file CacheMarshaller.cc.

◆ put_int16()

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

Definition at line 56 of file CacheMarshaller.cc.

◆ put_int32()

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

Definition at line 61 of file CacheMarshaller.cc.

◆ put_opaque()

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

Definition at line 98 of file CacheMarshaller.cc.

◆ put_str()

void CacheMarshaller::put_str ( const string &  val)
virtual

Definition at line 86 of file CacheMarshaller.cc.

◆ put_uint16()

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

Definition at line 76 of file CacheMarshaller.cc.

◆ put_uint32()

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

Definition at line 81 of file CacheMarshaller.cc.

◆ put_url()

void CacheMarshaller::put_url ( const string &  val)
virtual

Definition at line 93 of file CacheMarshaller.cc.

◆ 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: