IBR-DTNSuite
0.8
|
#include <StreamBlock.h>
Classes | |
class | Factory |
Public Types | |
enum | STREAM_FLAGS { STREAM_BEGIN = 1, STREAM_END = 1 << 0x01 } |
Public Member Functions | |
StreamBlock () | |
virtual | ~StreamBlock () |
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) |
void | setSequenceNumber (size_t seq) |
size_t | getSequenceNumber () const |
void | set (STREAM_FLAGS flag, const bool &value) |
bool | get (STREAM_FLAGS flag) const |
Static Public Attributes | |
static const char | BLOCK_TYPE = 242 |
Definition at line 19 of file StreamBlock.h.
Definition at line 32 of file StreamBlock.h.
Definition at line 19 of file StreamBlock.cpp.
Referenced by dtn::data::StreamBlock::Factory::create().
dtn::data::StreamBlock::~StreamBlock | ( | ) | [virtual] |
Definition at line 24 of file StreamBlock.cpp.
std::istream & dtn::data::StreamBlock::deserialize | ( | std::istream & | stream, |
const size_t | length | ||
) | [virtual] |
Deserialize the derived block payload.
stream | A input stream to deserialize from. |
Implements dtn::data::Block.
Definition at line 41 of file StreamBlock.cpp.
bool dtn::data::StreamBlock::get | ( | STREAM_FLAGS | flag | ) | const |
Definition at line 61 of file StreamBlock.cpp.
size_t dtn::data::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 29 of file StreamBlock.cpp.
References dtn::data::SDNV::getLength().
size_t dtn::data::StreamBlock::getSequenceNumber | ( | ) | const |
Definition at line 71 of file StreamBlock.cpp.
References dtn::data::SDNV::getValue().
Referenced by StreamBundle::clear(), and StreamBundle::getSequenceNumber().
std::ostream & dtn::data::StreamBlock::serialize | ( | std::ostream & | stream, |
size_t & | length | ||
) | const [virtual] |
Serialize the derived block payload.
stream | A output stream to serialize into. |
Implements dtn::data::Block.
Definition at line 34 of file StreamBlock.cpp.
void dtn::data::StreamBlock::set | ( | STREAM_FLAGS | flag, |
const bool & | value | ||
) |
Definition at line 49 of file StreamBlock.cpp.
void dtn::data::StreamBlock::setSequenceNumber | ( | size_t | seq | ) |
Definition at line 66 of file StreamBlock.cpp.
Referenced by StreamBundle::clear(), and StreamBundle::StreamBundle().
const char dtn::data::StreamBlock::BLOCK_TYPE = 242 [static] |
Definition at line 30 of file StreamBlock.h.