libdap::Marshaller Class Referenceabstract

abstract base class used to marshal/serialize dap data objects More...

`#include <Marshaller.h>`

Inheritance diagram for libdap::Marshaller:

## Public Member Functions

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

## Detailed Description

abstract base class used to marshal/serialize dap data objects

Definition at line 50 of file Marshaller.h.

## Member Function Documentation

## dump()

virtual void libdap::Marshaller::dump | ( | std::ostream & | strm | ) | const

pure 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::DapObj.

Implemented in libdap::D4StreamMarshaller, libdap::XDRStreamMarshaller, and libdap::XDRFileMarshaller.

## put_vector_end()

virtual void libdap::Marshaller::put_vector_end | ( |  | ) |

inline virtual

Close a vector written using put_vector_part()

Reimplemented in libdap::D4StreamMarshaller, and libdap::XDRStreamMarshaller.

Definition at line 98 of file Marshaller.h.

## put_vector_part()

virtual void libdap::Marshaller::put_vector_part | ( | char * | ,
|  | unsigned int | ,
|  | int | ,
|  | Type |
| ) |  |

inline virtual

Write one part of a vector's contents.

Parameters

  val | Pointer to the part's values
  num | The number of values in this part
  width | The number of bytes per value
  type | The DAP2 data type for each value

Reimplemented in libdap::XDRStreamMarshaller, and libdap::D4StreamMarshaller.

Definition at line 91 of file Marshaller.h.

## put_vector_start()

virtual void libdap::Marshaller::put_vector_start | ( | int |  | ) |

inline virtual

Write the prefix bytes for a vector and reset the state/counter for a vector/array that will be written using put_vector_part() and put_vector_end().

Parameters

  num | The number of elements to write

Reimplemented in libdap::D4StreamMarshaller, and libdap::XDRStreamMarshaller.

Definition at line 79 of file Marshaller.h.

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

- Marshaller.h