IBR-DTNSuite
0.8
|
#include <Serializer.h>
Public Member Functions | |
DefaultDeserializer (std::istream &stream) | |
DefaultDeserializer (std::istream &stream, Validator &v) | |
DefaultDeserializer (std::istream &stream, const Dictionary &d) | |
virtual | ~DefaultDeserializer () |
virtual Deserializer & | operator>> (dtn::data::Bundle &obj) |
virtual Deserializer & | operator>> (dtn::data::PrimaryBlock &obj) |
virtual Deserializer & | operator>> (dtn::data::Block &obj) |
virtual Deserializer & | operator>> (dtn::data::MetaBundle &obj) |
void | setFragmentationSupport (bool val) |
Protected Attributes | |
std::istream & | _stream |
Validator & | _validator |
AcceptValidator | _default_validator |
Definition at line 125 of file Serializer.h.
dtn::data::DefaultDeserializer::DefaultDeserializer | ( | std::istream & | stream | ) |
Default Deserializer
stream | Stream to read from |
Definition at line 535 of file Serializer.cpp.
dtn::data::DefaultDeserializer::DefaultDeserializer | ( | std::istream & | stream, |
Validator & | v | ||
) |
Initialize the Deserializer The validator can check each block, header or bundle for validity.
stream | Stream to read from |
v | Validator for the bundles and blocks |
Definition at line 540 of file Serializer.cpp.
dtn::data::DefaultDeserializer::DefaultDeserializer | ( | std::istream & | stream, |
const Dictionary & | d | ||
) |
Initialize the Deserializer with a default dictionary to reconstruct the right EID values of block if the primary header is not read by this Deserializer.
stream | Stream to read from |
d | The default dictionary |
Definition at line 545 of file Serializer.cpp.
virtual dtn::data::DefaultDeserializer::~DefaultDeserializer | ( | ) | [inline, virtual] |
Deserializer & dtn::data::DefaultDeserializer::operator>> | ( | dtn::data::Bundle & | obj | ) | [virtual] |
Implements dtn::data::Deserializer.
Definition at line 555 of file Serializer.cpp.
References dtn::data::PrimaryBlock::_appdatalength, dtn::data::PrimaryBlock::_fragmentoffset, _stream, _validator, dtn::data::PrimaryBlock::APPDATA_IS_ADMRECORD, dtn::data::PayloadBlock::BLOCK_TYPE, dtn::data::Bundle::clearBlocks(), dtn::data::Block::DISCARD_IF_NOT_PROCESSED, dtn::data::PrimaryBlock::DONT_FRAGMENT, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::ExtensionBlock::Factory::get(), dtn::data::Block::get(), dtn::data::PrimaryBlock::get(), dtn::data::PayloadBlock::getLength(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, ibrcommon::BLOB::Reference::iostream(), dtn::data::Block::LAST_BLOCK, dtn::PayloadReceptionInterrupted::length, dtn::data::Bundle::push_back(), dtn::data::Bundle::remove(), dtn::data::PrimaryBlock::set(), dtn::data::Bundle::toString(), and dtn::data::Validator::validate().
Deserializer & dtn::data::DefaultDeserializer::operator>> | ( | dtn::data::PrimaryBlock & | obj | ) | [virtual] |
Implements dtn::data::Deserializer.
Definition at line 724 of file Serializer.cpp.
References dtn::data::PrimaryBlock::_appdatalength, dtn::data::PrimaryBlock::_custodian, dtn::data::PrimaryBlock::_destination, dtn::data::PrimaryBlock::_fragmentoffset, dtn::data::PrimaryBlock::_lifetime, dtn::data::PrimaryBlock::_procflags, dtn::data::PrimaryBlock::_reportto, dtn::data::PrimaryBlock::_sequencenumber, dtn::data::PrimaryBlock::_source, _stream, dtn::data::PrimaryBlock::_timestamp, _validator, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::PrimaryBlock::get(), and dtn::data::Validator::validate().
Deserializer & dtn::data::DefaultDeserializer::operator>> | ( | dtn::data::Block & | obj | ) | [virtual] |
Implements dtn::data::Deserializer.
Reimplemented in dtn::data::SeparateDeserializer.
Definition at line 796 of file Serializer.cpp.
References dtn::data::Block::_blocktype, _stream, _validator, dtn::data::Block::addEID(), dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::deserialize(), dtn::data::Block::get(), dtn::data::Dictionary::get(), dtn::data::Block::LAST_BLOCK, and dtn::data::Validator::validate().
Deserializer & dtn::data::DefaultDeserializer::operator>> | ( | dtn::data::MetaBundle & | obj | ) | [virtual] |
Definition at line 701 of file Serializer.cpp.
References dtn::data::MetaBundle::appdatalength, dtn::data::MetaBundle::custodian, dtn::data::MetaBundle::destination, dtn::data::MetaBundle::expiretime, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::BundleID::fragment, dtn::utils::Clock::getExpireTime(), dtn::data::MetaBundle::hopcount, dtn::data::MetaBundle::lifetime, dtn::data::BundleID::offset, dtn::data::MetaBundle::procflags, dtn::data::MetaBundle::received, dtn::data::MetaBundle::reportto, dtn::data::BundleID::sequencenumber, dtn::data::BundleID::source, and dtn::data::BundleID::timestamp.
void dtn::data::DefaultDeserializer::setFragmentationSupport | ( | bool | val | ) |
Enable or disable reactive fragmentation support. (Default is disabled.)
val |
Definition at line 550 of file Serializer.cpp.
Referenced by dtn::net::operator>>().
Definition at line 173 of file Serializer.h.
std::istream& dtn::data::DefaultDeserializer::_stream [protected] |
Definition at line 171 of file Serializer.h.
Referenced by operator>>(), dtn::data::SeparateDeserializer::operator>>(), and dtn::data::SeparateDeserializer::readBlock().
Validator& dtn::data::DefaultDeserializer::_validator [protected] |
Definition at line 172 of file Serializer.h.
Referenced by operator>>(), and dtn::data::SeparateDeserializer::operator>>().