torc-master
|
A symbol table. More...
#include <SymTab.hpp>
Data Structures | |
struct | Data |
Public Types | |
typedef _KeyType | KeyType |
typedef _ValueType | ValueType |
typedef std::map< KeyType, Data > | Map |
typedef std::map< KeyType, ValueType > | UserMap |
Public Member Functions | |
SymTab () | |
~SymTab () throw () | |
bool | get (const KeyType &inKey, ValueType &outValue) const |
bool | set (const KeyType &inKey, const ValueType &inValue) |
bool | remove (const KeyType &inKey) |
void | getValues (std::vector< ValueType > &outValues) const |
void | getValueMap (UserMap &outMap) const |
size_t | getSize () const |
void | clear () |
template<typename _Action > | |
void | applyOnAll (const _Action &action) throw (Error) |
Private Attributes | |
Map | mValues |
size_t | mNextValue |
A symbol table.
This class acts as a symbol table to store key-value pairs
Definition at line 38 of file SymTab.hpp.
typedef _KeyType torc::generic::SymTab< _KeyType, _ValueType, cOverWriteExisting >::KeyType |
Definition at line 62 of file SymTab.hpp.
typedef std::map<KeyType, Data> torc::generic::SymTab< _KeyType, _ValueType, cOverWriteExisting >::Map |
Definition at line 64 of file SymTab.hpp.
typedef std::map<KeyType, ValueType> torc::generic::SymTab< _KeyType, _ValueType, cOverWriteExisting >::UserMap |
Definition at line 65 of file SymTab.hpp.
typedef _ValueType torc::generic::SymTab< _KeyType, _ValueType, cOverWriteExisting >::ValueType |
Definition at line 63 of file SymTab.hpp.
torc::generic::SymTab< _KeyType, _ValueType, cOverWriteExisting >::SymTab | ( | ) |
Definition at line 114 of file SymTab.hpp.
torc::generic::SymTab< _KeyType, _ValueType, cOverWriteExisting >::~SymTab | ( | ) | ||
throw | ( | |||
) |
Definition at line 118 of file SymTab.hpp.
|
inline |
Definition at line 192 of file SymTab.hpp.
|
inline |
Definition at line 187 of file SymTab.hpp.
|
inline |
Get a value for a key
[in] | inKey | key to look for |
[out] | outValue | resultant value |
Definition at line 121 of file SymTab.hpp.
|
inline |
Definition at line 182 of file SymTab.hpp.
|
inline |
|
inline |
|
inline |
Remove a value for a key
[in] | inKey | key to look for |
Definition at line 153 of file SymTab.hpp.
|
inline |
Set a value for a key. If cOverWriteExisting is true, Existing value will be replaced.
[in] | inKey | key to look for |
[in] | inValue | value to be stored |
Definition at line 132 of file SymTab.hpp.
|
private |
Definition at line 110 of file SymTab.hpp.
|
private |
Definition at line 108 of file SymTab.hpp.