IBR-DTNSuite
0.8
|
#include <Dictionary.h>
Public Member Functions | |
Dictionary () | |
Dictionary (const dtn::data::Bundle &bundle) | |
Dictionary (const Dictionary &d) | |
Dictionary & | operator= (const Dictionary &d) |
virtual | ~Dictionary () |
void | add (const EID &eid) |
void | add (const list< EID > &eids) |
EID | get (size_t scheme, size_t ssp) |
void | clear () |
size_t | getSize () const |
pair< size_t, size_t > | getRef (const EID &eid) const |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const dtn::data::Dictionary &obj) |
std::istream & | operator>> (std::istream &stream, dtn::data::Dictionary &obj) |
Definition at line 26 of file Dictionary.h.
create a empty dictionary
Definition at line 23 of file Dictionary.cpp.
dtn::data::Dictionary::Dictionary | ( | const dtn::data::Bundle & | bundle | ) |
create a dictionary with all EID of the given bundle
Definition at line 30 of file Dictionary.cpp.
References dtn::data::PrimaryBlock::_custodian, dtn::data::PrimaryBlock::_destination, dtn::data::PrimaryBlock::_reportto, dtn::data::PrimaryBlock::_source, dtn::data::Bundle::getBlocks(), and dtn::data::Block::getEIDList().
dtn::data::Dictionary::Dictionary | ( | const Dictionary & | d | ) |
copy constructor
Definition at line 48 of file Dictionary.cpp.
dtn::data::Dictionary::~Dictionary | ( | ) | [virtual] |
destructor
Definition at line 62 of file Dictionary.cpp.
void dtn::data::Dictionary::add | ( | const EID & | eid | ) |
add a eid to the dictionary
Definition at line 121 of file Dictionary.cpp.
References dtn::data::EID::getScheme(), and dtn::data::EID::getSSP().
Referenced by dtn::data::DefaultSerializer::rebuildDictionary().
void dtn::data::Dictionary::add | ( | const list< EID > & | eids | ) |
add a list of eids to the dictionary
Definition at line 127 of file Dictionary.cpp.
void dtn::data::Dictionary::clear | ( | ) |
clear the dictionary
Definition at line 153 of file Dictionary.cpp.
Referenced by dtn::data::DefaultSerializer::rebuildDictionary().
EID dtn::data::Dictionary::get | ( | size_t | scheme, |
size_t | ssp | ||
) |
return the eid for the reference [scheme,ssp]
Definition at line 138 of file Dictionary.cpp.
Referenced by dtn::data::DefaultDeserializer::operator>>().
pair< size_t, size_t > dtn::data::Dictionary::getRef | ( | const EID & | eid | ) | const |
returns the references of the given eid
Definition at line 163 of file Dictionary.cpp.
References dtn::data::EID::getScheme(), and dtn::data::EID::getSSP().
Referenced by dtn::data::DefaultSerializer::getLength(), dtn::security::StrictSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), and dtn::data::DefaultSerializer::serialize().
size_t dtn::data::Dictionary::getSize | ( | ) | const |
returns the size of the bytearray
Definition at line 158 of file Dictionary.cpp.
Referenced by dtn::data::DefaultSerializer::getLength(), dtn::data::DefaultSerializer::operator<<(), and dtn::data::operator<<().
Dictionary & dtn::data::Dictionary::operator= | ( | const Dictionary & | d | ) |
assign operator
Definition at line 56 of file Dictionary.cpp.
std::ostream& operator<< | ( | std::ostream & | stream, |
const dtn::data::Dictionary & | obj | ||
) | [friend] |
Definition at line 170 of file Dictionary.cpp.
std::istream& operator>> | ( | std::istream & | stream, |
dtn::data::Dictionary & | obj | ||
) | [friend] |
Definition at line 179 of file Dictionary.cpp.