Public Member Functions | Static Public Attributes

dtn::data::PayloadBlock Class Reference

#include <PayloadBlock.h>

Inherits dtn::data::Block.

Collaboration diagram for dtn::data::PayloadBlock:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PayloadBlock ()
 PayloadBlock (ibrcommon::BLOB::Reference ref)
virtual ~PayloadBlock ()
ibrcommon::BLOB::Reference getBLOB () const
virtual size_t getLength () const
virtual std::ostream & serialize (std::ostream &stream) const
virtual std::istream & deserialize (std::istream &stream)

Static Public Attributes

static const char BLOCK_TYPE = 1

Detailed Description

Definition at line 20 of file PayloadBlock.h.


Constructor & Destructor Documentation

dtn::data::PayloadBlock::PayloadBlock (  ) 

Definition at line 17 of file PayloadBlock.cpp.

dtn::data::PayloadBlock::PayloadBlock ( ibrcommon::BLOB::Reference  ref  ) 

Definition at line 22 of file PayloadBlock.cpp.

dtn::data::PayloadBlock::~PayloadBlock (  )  [virtual]

Definition at line 27 of file PayloadBlock.cpp.


Member Function Documentation

std::istream & dtn::data::PayloadBlock::deserialize ( std::istream &  stream  )  [virtual]

Deserialize the derived block payload.

Parameters:
stream A input stream to deserialize from.
Returns:
The same reference as given with the stream parameter.

Implements dtn::data::Block.

Definition at line 57 of file PayloadBlock.cpp.

References dtn::data::Block::_blocksize, ibrcommon::BLOB::iostream::clear(), ibrcommon::BLOB::copy(), ibrcommon::BLOB::Reference::iostream(), and ibrcommon::Exception::what().

Here is the call graph for this function:

ibrcommon::BLOB::Reference dtn::data::PayloadBlock::getBLOB (  )  const
size_t dtn::data::PayloadBlock::getLength (  )  const [virtual]

Return the length of the payload, if this were an abstract block. It is the length put in the third field, after block type and processing flags.

Implements dtn::data::Block.

Definition at line 36 of file PayloadBlock.cpp.

References ibrcommon::BLOB::Reference::iostream(), and ibrcommon::BLOB::iostream::size().

Here is the call graph for this function:

std::ostream & dtn::data::PayloadBlock::serialize ( std::ostream &  stream  )  const [virtual]

Serialize the derived block payload.

Parameters:
stream A output stream to serialize into.
Returns:
The same reference as given with the stream parameter.

Implements dtn::data::Block.

Definition at line 43 of file PayloadBlock.cpp.

References ibrcommon::BLOB::copy(), ibrcommon::BLOB::Reference::iostream(), ibrcommon::BLOB::iostream::size(), and ibrcommon::Exception::what().

Here is the call graph for this function:


Member Data Documentation

const char dtn::data::PayloadBlock::BLOCK_TYPE = 1 [static]

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