Classes | Public Member Functions | Static Public Attributes

StreamBlock Class Reference

#include <BundleStream.h>

Inherits dtn::data::Block.

Collaboration diagram for StreamBlock:
Collaboration graph
[legend]

List of all members.

Classes

class  Factory

Public Member Functions

 StreamBlock ()
virtual ~StreamBlock ()
virtual size_t getLength () const
virtual std::ostream & serialize (std::ostream &stream) const
virtual std::istream & deserialize (std::istream &stream)
void setSequenceNumber (size_t seq)
size_t getSequenceNumber () const

Static Public Attributes

static const char BLOCK_TYPE = 242

Detailed Description

Definition at line 17 of file BundleStream.h.


Constructor & Destructor Documentation

StreamBlock::StreamBlock (  ) 

Definition at line 25 of file dtnstream.cpp.

Referenced by StreamBlock::Factory::create().

StreamBlock::~StreamBlock (  )  [virtual]

Definition at line 30 of file dtnstream.cpp.


Member Function Documentation

std::istream & StreamBlock::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 46 of file dtnstream.cpp.

size_t StreamBlock::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 35 of file dtnstream.cpp.

References dtn::data::SDNV::getLength().

Here is the call graph for this function:

size_t StreamBlock::getSequenceNumber (  )  const

Definition at line 57 of file dtnstream.cpp.

References dtn::data::SDNV::getValue().

Referenced by StreamBundle::clear(), and StreamBundle::getSequenceNumber().

Here is the call graph for this function:

std::ostream & StreamBlock::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 40 of file dtnstream.cpp.

void StreamBlock::setSequenceNumber ( size_t  seq  ) 

Definition at line 52 of file dtnstream.cpp.

Referenced by StreamBundle::clear(), and StreamBundle::StreamBundle().


Member Data Documentation

const char StreamBlock::BLOCK_TYPE = 242 [static]

Definition at line 28 of file BundleStream.h.


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