Basic datahash object. More...
#include <datahash.h>
Public Member Functions | |
void | insert (IN const char *key, IN const hash_value_t &hv) |
void | insert (IN const std::string &key, IN const hash_value_t &hv) |
insert the given object at the given key value | |
void | insert (IN const char *key, IN const char *value) |
void | insert (IN const char *key, IN smart_ptr< Datahash > &subHash) |
int | count (IN const char *key) const throw () |
void | getIterator (OUT iterator_t &i) const throw () |
void | getIterator (IN const char *key, OUT iterator_t &i) const throw () |
const hash_value_t * | getNextElementUnsafe (IO iterator_t &i, OUT std::string &key) const throw () |
const hash_value_t * | getNextElementUnsafe (IO iterator_t &i) const throw () |
int | size (void) |
how many elements in the map | |
int | count (IN const std::string &key) |
how many elements with the given key | |
void | remove (IN const std::string &key) |
remove (erase) all elements with this key | |
void | clear (void) |
clear out (erase) the entire map | |
void | getIterator (OUT iterator_t &i) |
get an iterator (points to the first element in the map) | |
void | getIterator (IN const std::string &key, OUT iterator_t &i) |
get an iterator just for a particular key | |
bool | getNextElement (IO iterator_t &i, OUT std::string &k, OUT hash_value_t &t) |
get next element in map and increment iterator | |
hash_value_t * | getNextElementUnsafe (IO iterator_t &i, OUT std::string &k) |
get next element without getting a local copy. | |
Static Public Member Functions | |
static smart_ptr< Datahash > | create (void) |
Basic datahash object.
A recursive hash structure that supports key/value access, where there are (in general) multiple values for a given key. Keys are either simple (a single value is a single string) or complex (a single value is itself another hash).
Definition at line 106 of file lib/datahash/datahash.h.
int threadsafe_multimap< std::string , hash_value_t >::size | ( | void | ) | [inline, inherited] |
how many elements in the map
Definition at line 77 of file threadsafe_multimap.h.
int threadsafe_multimap< std::string , hash_value_t >::count | ( | IN const std::string & | key | ) | [inline, inherited] |
how many elements with the given key
Definition at line 84 of file threadsafe_multimap.h.
void threadsafe_multimap< std::string , hash_value_t >::remove | ( | IN const std::string & | key | ) | [inline, inherited] |
remove (erase) all elements with this key
Definition at line 97 of file threadsafe_multimap.h.
void threadsafe_multimap< std::string , hash_value_t >::clear | ( | void | ) | [inline, inherited] |
clear out (erase) the entire map
Definition at line 105 of file threadsafe_multimap.h.
void threadsafe_multimap< std::string , hash_value_t >::getIterator | ( | OUT iterator_t & | i | ) | [inline, inherited] |
get an iterator (points to the first element in the map)
Definition at line 112 of file threadsafe_multimap.h.
void threadsafe_multimap< std::string , hash_value_t >::getIterator | ( | IN const std::string & | key, | |
OUT iterator_t & | i | |||
) | [inline, inherited] |
get an iterator just for a particular key
Definition at line 120 of file threadsafe_multimap.h.
bool threadsafe_multimap< std::string , hash_value_t >::getNextElement | ( | IO iterator_t & | i, | |
OUT std::string & | k, | |||
OUT hash_value_t & | t | |||
) | [inline, inherited] |
get next element in map and increment iterator
Definition at line 129 of file threadsafe_multimap.h.
hash_value_t * threadsafe_multimap< std::string , hash_value_t >::getNextElementUnsafe | ( | IO iterator_t & | i, | |
OUT std::string & | k | |||
) | [inline, inherited] |
get next element without getting a local copy.
Caller had better be sure that the element won't be removed after this call!
Definition at line 141 of file threadsafe_multimap.h.