IBR-DTNSuite  0.8
dtn::data::ExtensionBlock Class Reference

#include <ExtensionBlock.h>

Inheritance diagram for dtn::data::ExtensionBlock:
Collaboration diagram for dtn::data::ExtensionBlock:

List of all members.

Classes

class  Factory
class  FactoryList

Public Member Functions

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

Static Protected Attributes

static FactoryListfactories = NULL

Detailed Description

Definition at line 19 of file ExtensionBlock.h.


Constructor & Destructor Documentation

Definition at line 91 of file ExtensionBlock.cpp.


Member Function Documentation

std::istream & dtn::data::ExtensionBlock::deserialize ( std::istream &  stream,
const size_t  length 
) [virtual]

Deserialize the derived block payload.

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

Implements dtn::data::Block.

Definition at line 121 of file ExtensionBlock.cpp.

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

Here is the call graph for this function:

size_t dtn::data::ExtensionBlock::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 100 of file ExtensionBlock.cpp.

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

Here is the call graph for this function:

std::ostream & dtn::data::ExtensionBlock::serialize ( std::ostream &  stream,
size_t &  length 
) const [virtual]

Serialize the derived block payload.

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

Implements dtn::data::Block.

Definition at line 107 of file ExtensionBlock.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


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