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

#include <ExtensionBlock.h>

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

Classes

class  Factory
 
class  FactoryList
 

Public Member Functions

 ExtensionBlock ()
 
 ExtensionBlock (ibrcommon::BLOB::Reference ref)
 
virtual ~ExtensionBlock ()
 
ibrcommon::BLOB::Reference getBLOB () const
 
void setType (block_t type)
 
virtual Length getLength () const
 
virtual std::ostream & serialize (std::ostream &stream, Length &length) const
 
virtual std::istream & deserialize (std::istream &stream, const Length &length)
 
- Public Member Functions inherited from dtn::data::Block
virtual ~Block ()
 
Blockoperator= (const Block &block)
 
bool operator== (const block_t &id) const
 
virtual void addEID (const dtn::data::EID &eid)
 
virtual void clearEIDs ()
 
virtual const eid_listgetEIDList () const
 
const block_tgetType () const
 
void set (ProcFlags flag, const bool &value)
 
bool get (ProcFlags flag) const
 
const Bitset< ProcFlags > & getProcessingFlags () const
 
virtual Length getLength_strict () const
 
virtual std::ostream & serialize_strict (std::ostream &stream, Length &length) const
 

Static Protected Attributes

static FactoryListfactories = NULL
 

Additional Inherited Members

- Public Types inherited from dtn::data::Block
enum  ProcFlags {
  REPLICATE_IN_EVERY_FRAGMENT = 1, TRANSMIT_STATUSREPORT_IF_NOT_PROCESSED = 1 << 0x01, DELETE_BUNDLE_IF_NOT_PROCESSED = 1 << 0x02, LAST_BLOCK = 1 << 0x03,
  DISCARD_IF_NOT_PROCESSED = 1 << 0x04, FORWARDED_WITHOUT_PROCESSED = 1 << 0x05, BLOCK_CONTAINS_EIDS = 1 << 0x06
}
 
typedef std::list< dtn::data::EIDeid_list
 
- Protected Member Functions inherited from dtn::data::Block
 Block (block_t blocktype)
 
- Protected Attributes inherited from dtn::data::Block
block_t _blocktype
 
eid_list _eids
 

Detailed Description

Definition at line 34 of file ExtensionBlock.h.

Constructor & Destructor Documentation

dtn::data::ExtensionBlock::ExtensionBlock ( )

Definition at line 95 of file ExtensionBlock.cpp.

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

Definition at line 100 of file ExtensionBlock.cpp.

dtn::data::ExtensionBlock::~ExtensionBlock ( )
virtual

Definition at line 105 of file ExtensionBlock.cpp.

Member Function Documentation

std::istream & dtn::data::ExtensionBlock::deserialize ( std::istream &  stream,
const Length 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 140 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:

ibrcommon::BLOB::Reference dtn::data::ExtensionBlock::getBLOB ( ) const

Definition at line 109 of file ExtensionBlock.cpp.

Length 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 119 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,
Length 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 126 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:

void dtn::data::ExtensionBlock::setType ( block_t  type)

Definition at line 114 of file ExtensionBlock.cpp.

References dtn::data::Block::_blocktype.

Referenced by dtn::data::BundleBuilder::insert().

Member Data Documentation


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