interreality.org [VOS]
[Home] [About]
[Screenshots]
[Download]
[News]
[Community]
[Documentation] [Manual]
[Bugs & Requests] [Wiki]

VOS::COD Class Reference
[libvos]

#include <vos/vos/cod.hh>

Inheritance diagram for VOS::COD:

VOS::VobjectInput VOS::VobjectOutput VOS::VobjectStore VOS::VobjectStore VOS::RemoteCOD List of all members.

Detailed Description

COD stands for Compact Object Description.

It is a binary file format for saving and loading Vobjects, and (in the form of the RemoteCOD subclass) is also used for efficient batch downloads of the state of many remote vobjects.

Definition at line 27 of file cod.hh.

Public Member Functions

Protected Member Functions

Protected Attributes


Constructor & Destructor Documentation

VOS::COD::COD ( Site ls  ) 

Constructor.

Does not initialize with an iostream, so you will have to supply a buffer when you call readCOD or writeCOD.

Parameters:
ls The local site any new vobjects will be created on.

VOS::COD::COD ( const VobjectStore vs  ) 

virtual VOS::COD::~COD (  )  [virtual]

Destructor.


Member Function Documentation

virtual bool VOS::COD::checkCOD (  )  [protected, virtual]

virtual int VOS::COD::computeSize (  )  [virtual]

Computes the output size of the COD.

Returns:
the number of bytes needed to store this COD

virtual void VOS::COD::doReadVobjects (  )  [protected, virtual]

Reimplemented in VOS::RemoteCOD.

void VOS::COD::read ( unsigned char *  data,
unsigned int  size 
) [protected]

void VOS::COD::read ( char *  data,
unsigned int  size 
) [protected]

virtual uint32_t VOS::COD::readLong (  )  [protected, virtual]

virtual void VOS::COD::readObjectChildren ( std::string &  parent,
std::deque< PCR > &  children 
) [protected, virtual]

virtual void VOS::COD::readObjectDesc ( std::string &  name,
uint32_t &  pos,
std::deque< std::string > &  types,
MessageBlock mb 
) [protected, virtual]

virtual uint16_t VOS::COD::readShort (  )  [protected, virtual]

virtual std::string VOS::COD::readStr (  )  [protected, virtual]

virtual void VOS::COD::readVobjects ( unsigned char *  buffer,
unsigned int  size,
ImpExpEnv environment 
) [virtual]

Read the COD from the supplied data buffer.

Parameters:
buffer the source data
size the length of the data

Implements VOS::VobjectInput.

virtual void VOS::COD::readVobjects ( std::istream &  input,
ImpExpEnv environment 
) [virtual]

Read a COD from the supplied input stream.

Implements VOS::VobjectInput.

virtual void VOS::COD::setProgressMeter ( ProgressMeterCallback cb  )  [inline, virtual]

Set a progress meter callback to be called periodically to indicate the progress of unpacking the COD file.

Definition at line 103 of file cod.hh.

void VOS::COD::write ( const unsigned char *  data,
unsigned int  size 
) [protected]

void VOS::COD::write ( const char *  data,
unsigned int  size 
) [protected]

virtual int VOS::COD::writeObjectChildren ( Vobject v,
bool  doWrite = true 
) [protected, virtual]

virtual int VOS::COD::writeObjectDesc ( Entry v,
bool  doWrite = true 
) [protected, virtual]

virtual void VOS::COD::writeVobjects ( unsigned char **  buffer,
unsigned int *  size,
ImpExpEnv environment 
) [virtual]

Write the current COD to a buffer.

The buffer is malloc()'d by writeCOD and returned via the supplied parameters.

Parameters:
buffer the data buffer holding the COD data. You should free() this when you're done.
size the size of the buffer

Implements VOS::VobjectOutput.

virtual void VOS::COD::writeVobjects ( std::ostream &  output,
ImpExpEnv environment 
) [virtual]

Write the current COD to the initialized iostream.

Implements VOS::VobjectOutput.


Member Data Documentation

unsigned char* VOS::COD::buffer [protected]

Definition at line 34 of file cod.hh.

unsigned int VOS::COD::buffersize [protected]

Definition at line 33 of file cod.hh.

std::istream* VOS::COD::inputstream [protected]

Definition at line 30 of file cod.hh.

unsigned int VOS::COD::offset [protected]

Definition at line 32 of file cod.hh.

Definition at line 36 of file cod.hh.


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