#include <Dictionary.h>
Public Member Functions | |
| Dictionary () | |
| virtual | ~Dictionary () |
| pair< unsigned int, unsigned int > | add (string uri) |
| string | get (unsigned int scheme, unsigned int ssp) const |
| string | get (unsigned int pos) const |
| unsigned int | get (string entry) const |
| void | read (unsigned char *data, unsigned int length) |
| unsigned int | getLength () const |
| unsigned int | getSize () const |
| unsigned int | write (unsigned char *data) const |
Static Public Member Functions | |
| static pair< string, string > | split (string uri) throw (exceptions::InvalidDataException) |
Private Member Functions | |
| bool | exists (string entry) |
Private Attributes | |
| map< unsigned int, string, m_positionSort > | m_entrys |
Classes | |
| struct | m_positionSort |
| dtn::data::Dictionary::Dictionary | ( | ) |
constructor
| dtn::data::Dictionary::~Dictionary | ( | ) | [virtual] |
destructor
| pair< unsigned int, unsigned int > dtn::data::Dictionary::add | ( | string | uri | ) |
Add a new entry to the dictionary.
References exists(), getLength(), m_entrys, and split().
Referenced by dtn::data::BundleFactory::newBundle(), dtn::data::Bundle::setCustodian(), dtn::data::Bundle::setDestination(), dtn::data::Bundle::setReportTo(), and dtn::data::Bundle::setSource().
| string dtn::data::Dictionary::get | ( | unsigned int | scheme, | |
| unsigned int | ssp | |||
| ) | const |
Return a full uri from the dictionary.
Referenced by dtn::data::Bundle::getCustodian(), dtn::data::Bundle::getDestination(), dtn::data::Bundle::getReportTo(), and dtn::data::Bundle::getSource().
| string dtn::data::Dictionary::get | ( | unsigned int | pos | ) | const |
Return a entry of the dictionary.
References m_entrys.
| unsigned int dtn::data::Dictionary::get | ( | string | entry | ) | const |
| void dtn::data::Dictionary::read | ( | unsigned char * | data, | |
| unsigned int | length | |||
| ) |
Read a dictionary from a data array.
References m_entrys.
Referenced by dtn::data::Bundle::getDictionary().
| unsigned int dtn::data::Dictionary::getLength | ( | ) | const |
Return the length of the dictionary data array.
References m_entrys.
Referenced by add(), dtn::data::Bundle::commitDictionary(), and dtn::data::BundleFactory::newBundle().
| unsigned int dtn::data::Dictionary::getSize | ( | ) | const |
Return the count of the entrys in the dictionary.
References m_entrys.
| unsigned int dtn::data::Dictionary::write | ( | unsigned char * | data | ) | const |
Write the dictionary to a given data array and returns the count of written bytes.
References m_entrys.
Referenced by dtn::data::Bundle::commitDictionary(), and dtn::data::BundleFactory::newBundle().
| pair< string, string > dtn::data::Dictionary::split | ( | string | uri | ) | throw (exceptions::InvalidDataException) [static] |
Split a URI into Scheme and SSP
| uri | The URI to split. |
Referenced by add().
| bool dtn::data::Dictionary::exists | ( | string | entry | ) | [private] |
map<unsigned int, string, m_positionSort> dtn::data::Dictionary::m_entrys [private] |
1.5.6