IBR-DTNSuite  0.10
dtn::data::Dictionary Class Reference

#include <Dictionary.h>

Collaboration diagram for dtn::data::Dictionary:
Collaboration graph

Classes

class  EntryNotFoundException
 

Public Types

typedef std::pair< Number, NumberReference
 

Public Member Functions

 Dictionary ()
 
 Dictionary (const dtn::data::Bundle &bundle)
 
 Dictionary (const Dictionary &d)
 
Dictionaryoperator= (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)
 

Detailed Description

Definition at line 40 of file Dictionary.h.

Member Typedef Documentation

returns the references of the given eid

Definition at line 109 of file Dictionary.h.

Constructor & Destructor Documentation

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().

Here is the call graph for this function:

dtn::data::Dictionary::Dictionary ( const Dictionary d)

copy constructor

Definition at line 47 of file Dictionary.cpp.

References operator=().

Here is the call graph for this function:

dtn::data::Dictionary::~Dictionary ( )
virtual

destructor

Definition at line 61 of file Dictionary.cpp.

Member Function Documentation

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().

Here is the call graph for this function:

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)
void dtn::data::Dictionary::clear ( )

clear the dictionary

Definition at line 168 of file Dictionary.cpp.

Referenced by dtn::data::DefaultSerializer::rebuildDictionary().

EID dtn::data::Dictionary::get ( const Number scheme,
const Number ssp 
)

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().

Here is the call graph for this function:

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)

assign operator

Definition at line 55 of file Dictionary.cpp.

Referenced by Dictionary().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const dtn::data::Dictionary obj 
)
friend

Definition at line 185 of file Dictionary.cpp.

std::istream& operator>> ( std::istream &  stream,
dtn::data::Dictionary obj 
)
friend

Definition at line 194 of file Dictionary.cpp.


The documentation for this class was generated from the following files: