dtn::data::Dictionary Class Reference

#include <Dictionary.h>

List of all members.

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


Detailed Description

This class manages a dictionary of a bundles primary block.

Constructor & Destructor Documentation

dtn::data::Dictionary::Dictionary (  ) 

constructor

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

destructor


Member Function Documentation

pair< unsigned int, unsigned int > dtn::data::Dictionary::add ( string  uri  ) 

string dtn::data::Dictionary::get ( unsigned int  scheme,
unsigned int  ssp 
) const

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

Return the position of a entry in the data array.

References m_entrys.

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.

Returns:
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

Parameters:
uri The URI to split.
Returns:
A pair of Scheme and SSP.

Referenced by add().

bool dtn::data::Dictionary::exists ( string  entry  )  [private]

Check if a entry already exists in the dictionary.

References m_entrys.

Referenced by add().


Member Data Documentation

map<unsigned int, string, m_positionSort> dtn::data::Dictionary::m_entrys [private]


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

Generated on Wed Mar 25 12:41:42 2009 for IBR-DTN by  doxygen 1.5.6