IBR-DTNSuite
0.10
|
#include <Dictionary.h>
Classes | |
class | EntryNotFoundException |
Public Types | |
typedef std::pair< Number, Number > | Reference |
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 std::list< EID > &eids) |
void | add (const Bundle &bundle) |
EID | get (const Number &scheme, const Number &ssp) |
void | clear () |
Size | getSize () const |
Reference | 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 40 of file Dictionary.h.
typedef std::pair<Number, Number> dtn::data::Dictionary::Reference |
returns the references of the given eid
Definition at line 109 of file Dictionary.h.
dtn::data::Dictionary::Dictionary | ( | ) |
create a empty dictionary
Definition at line 35 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 42 of file Dictionary.cpp.
References add().
dtn::data::Dictionary::Dictionary | ( | const Dictionary & | d | ) |
copy constructor
Definition at line 47 of file Dictionary.cpp.
References operator=().
|
virtual |
destructor
Definition at line 61 of file Dictionary.cpp.
void dtn::data::Dictionary::add | ( | const EID & | eid | ) |
add an EID to the dictionary
Definition at line 120 of file Dictionary.cpp.
References dtn::data::EID::getScheme(), and dtn::data::EID::getSSP().
Referenced by add(), Dictionary(), and dtn::data::DefaultSerializer::rebuildDictionary().
void dtn::data::Dictionary::add | ( | const std::list< EID > & | eids | ) |
add a list of EIDs to the dictionary
void dtn::data::Dictionary::add | ( | const Bundle & | bundle | ) |
add all EIDs of a bundle into the dictionary
Definition at line 137 of file Dictionary.cpp.
References add(), dtn::data::Bundle::begin(), dtn::data::PrimaryBlock::custodian, dtn::data::PrimaryBlock::destination, dtn::data::Bundle::end(), dtn::data::Block::getEIDList(), dtn::data::PrimaryBlock::reportto, and dtn::data::PrimaryBlock::source.
void dtn::data::Dictionary::clear | ( | ) |
clear the dictionary
Definition at line 168 of file Dictionary.cpp.
Referenced by dtn::data::DefaultSerializer::rebuildDictionary().
return the eid for the reference [scheme,ssp]
Definition at line 153 of file Dictionary.cpp.
References dtn::data::SDNV< E >::get().
Referenced by dtn::data::DefaultDeserializer::operator>>(), and dtn::data::DefaultDeserializer::read().
dtn::data::Dictionary::Reference dtn::data::Dictionary::getRef | ( | const EID & | eid | ) | const |
Definition at line 178 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 dtn::data::Dictionary::getSize | ( | ) | const |
returns the size of the bytearray
Definition at line 173 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 | ) |
|
friend |
Definition at line 185 of file Dictionary.cpp.
|
friend |
Definition at line 194 of file Dictionary.cpp.