IBR-DTNSuite
0.12
|
#include <Serializer.h>
Public Member Functions | |
DefaultSerializer (std::ostream &stream) | |
DefaultSerializer (std::ostream &stream, const Dictionary &d) | |
virtual | ~DefaultSerializer () |
virtual Serializer & | operator<< (const dtn::data::Bundle &obj) |
virtual Serializer & | operator<< (const dtn::data::PrimaryBlock &obj) |
virtual Serializer & | operator<< (const dtn::data::Block &obj) |
virtual Serializer & | operator<< (const dtn::data::BundleFragment &obj) |
virtual Length | getLength (const dtn::data::Bundle &obj) |
virtual Length | getLength (const dtn::data::PrimaryBlock &obj) const |
virtual Length | getLength (const dtn::data::Block &obj) const |
Public Member Functions inherited from dtn::data::Serializer | |
virtual | ~Serializer () |
Protected Member Functions | |
Serializer & | serialize (const dtn::data::PayloadBlock &obj, const Length &clip_offset, const Length &clip_length) |
void | rebuildDictionary (const dtn::data::Bundle &obj) |
bool | isCompressable (const dtn::data::Bundle &obj) const |
Protected Attributes | |
std::ostream & | _stream |
Dictionary | _dictionary |
bool | _compressable |
Definition at line 95 of file Serializer.h.
dtn::data::DefaultSerializer::DefaultSerializer | ( | std::ostream & | stream) |
Default serializer.
stream | Stream to write to |
Definition at line 45 of file Serializer.cpp.
dtn::data::DefaultSerializer::DefaultSerializer | ( | std::ostream & | stream, |
const Dictionary & | d | ||
) |
Initialize the Serializer with a default dictionary. This will be used to write the right values in the EID reference part of blocks.
stream | Stream to write to |
d | The default dictionary |
Definition at line 50 of file Serializer.cpp.
|
inlinevirtual |
Destructor
Definition at line 115 of file Serializer.h.
|
virtual |
Implements dtn::data::Serializer.
Reimplemented in dtn::security::MutableSerializer.
Definition at line 382 of file Serializer.cpp.
References rebuildDictionary().
Referenced by getLength(), dtn::net::UDPConvergenceLayer::queue(), dtn::storage::MemoryBundleStorage::store(), dtn::storage::SimpleBundleStorage::store(), and dtn::storage::SQLiteBundleStorage::store().
|
virtual |
Reimplemented in dtn::security::MutableSerializer.
Definition at line 400 of file Serializer.cpp.
References _compressable, _dictionary, dtn::data::PrimaryBlock::appdatalength, dtn::data::PrimaryBlock::custodian, dtn::data::PrimaryBlock::destination, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::BundleID::fragmentoffset, dtn::data::PrimaryBlock::get(), dtn::data::EID::getCompressed(), dtn::data::SDNV< E >::getLength(), dtn::data::Dictionary::getRef(), dtn::data::Dictionary::getSize(), dtn::data::PrimaryBlock::lifetime, dtn::data::PrimaryBlock::procflags, dtn::data::PrimaryBlock::reportto, dtn::data::BundleID::sequencenumber, dtn::data::BundleID::source, and dtn::data::BundleID::timestamp.
|
virtual |
Reimplemented in dtn::data::SeparateSerializer, and dtn::security::MutableSerializer.
Definition at line 502 of file Serializer.cpp.
References _dictionary, dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::get(), dtn::data::Block::getEIDList(), dtn::data::Block::getLength(), dtn::data::SDNV< E >::getLength(), getLength(), dtn::data::Block::getProcessingFlags(), dtn::data::Dictionary::getRef(), and dtn::data::Block::getType().
|
protected |
Definition at line 141 of file Serializer.cpp.
References dtn::data::Bundle::begin(), dtn::data::PrimaryBlock::custodian, dtn::data::PrimaryBlock::destination, dtn::data::Bundle::end(), dtn::data::Block::getEIDList(), dtn::data::EID::isCompressable(), dtn::data::PrimaryBlock::reportto, and dtn::data::BundleID::source.
Referenced by rebuildDictionary().
|
virtual |
Implements dtn::data::Serializer.
Reimplemented in dtn::security::StrictSerializer.
Definition at line 67 of file Serializer.cpp.
References dtn::data::Bundle::begin(), dtn::data::Bundle::end(), and rebuildDictionary().
|
virtual |
Reimplemented in dtn::security::MutableSerializer.
Definition at line 171 of file Serializer.cpp.
References _compressable, _dictionary, _stream, dtn::data::PrimaryBlock::appdatalength, dtn::data::PrimaryBlock::custodian, dtn::data::PrimaryBlock::destination, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::BundleID::fragmentoffset, dtn::data::PrimaryBlock::get(), dtn::data::EID::getCompressed(), dtn::data::SDNV< E >::getLength(), dtn::data::Dictionary::getRef(), dtn::data::Dictionary::getSize(), dtn::data::PrimaryBlock::lifetime, dtn::data::PrimaryBlock::procflags, dtn::data::PrimaryBlock::reportto, dtn::data::BundleID::sequencenumber, dtn::data::BundleID::source, and dtn::data::BundleID::timestamp.
|
virtual |
Reimplemented in dtn::data::SeparateSerializer, dtn::security::MutableSerializer, and dtn::security::StrictSerializer.
Definition at line 284 of file Serializer.cpp.
References _compressable, _dictionary, _stream, dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::get(), dtn::data::Block::getEIDList(), dtn::data::Block::getLength(), dtn::data::Block::getProcessingFlags(), dtn::data::Dictionary::getRef(), dtn::data::Block::getType(), and dtn::data::Block::serialize().
|
virtual |
Reimplemented from dtn::data::Serializer.
Definition at line 85 of file Serializer.cpp.
References dtn::data::BundleFragment::_bundle, dtn::data::BundleFragment::_length, dtn::data::BundleFragment::_offset, dtn::data::PrimaryBlock::appdatalength, dtn::data::Bundle::begin(), dtn::data::PayloadBlock::BLOCK_TYPE, dtn::data::Bundle::end(), dtn::data::Bundle::find(), dtn::data::PrimaryBlock::FRAGMENT, dtn::data::BundleID::fragmentoffset, dtn::data::Block::get(), dtn::data::PrimaryBlock::get(), dtn::data::PayloadBlock::getLength(), rebuildDictionary(), dtn::data::Block::REPLICATE_IN_EVERY_FRAGMENT, serialize(), and dtn::data::PrimaryBlock::set().
|
protected |
Definition at line 55 of file Serializer.cpp.
References _compressable, _dictionary, dtn::data::Dictionary::add(), dtn::data::Dictionary::clear(), and isCompressable().
Referenced by getLength(), dtn::security::StrictSerializer::operator<<(), and operator<<().
|
protected |
Definition at line 327 of file Serializer.cpp.
References _compressable, _dictionary, _stream, dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::get(), dtn::data::Block::getEIDList(), dtn::data::PayloadBlock::getLength(), dtn::data::Block::getProcessingFlags(), dtn::data::Dictionary::getRef(), dtn::data::Block::getType(), and dtn::data::PayloadBlock::serialize().
Referenced by operator<<().
|
protected |
Definition at line 133 of file Serializer.h.
Referenced by getLength(), dtn::security::StrictSerializer::operator<<(), operator<<(), rebuildDictionary(), and serialize().
|
protected |
Definition at line 132 of file Serializer.h.
Referenced by getLength(), dtn::security::StrictSerializer::operator<<(), operator<<(), rebuildDictionary(), and serialize().
|
protected |
Definition at line 130 of file Serializer.h.
Referenced by dtn::security::StrictSerializer::operator<<(), dtn::security::MutableSerializer::operator<<(), operator<<(), dtn::data::SeparateSerializer::operator<<(), and serialize().