Container representing each node in the Trie. More...
#include <trie.h>
Public Types | |
typedef Items::const_iterator | const_iterator |
typedef NodeClass::EndNodeItemClass | EndNodeItemClass |
typedef NodeItem< T, V, Cmp, SetItems< T, V, Cmp > > | Item |
typedef std::set< Item *, NodeItemPtrCompare< T, V, Cmp, SetItems< T, V, Cmp > > > | Items |
typedef Items::iterator | iterator |
typedef Node< T, V, Cmp, SetItems< T, V, Cmp > > | NodeClass |
typedef NodeClass::NodeItemClass | NodeItemClass |
Public Member Functions | |
SetItems (T const &endSymbol) | |
iterator | begin () |
const_iterator | begin () const |
void | clear () |
NodeItemClass * | createNodeItem (T const &k) |
bool | empty () const |
iterator | end () |
const_iterator | end () const |
bool | eraseItem (T const &k) |
const_iterator | find (const T &k) const |
iterator | find (const T &k) |
const Item * | getItem (T const &k) const |
Item * | getItem (T const &k) |
std::pair< Item *, bool > | insertItem (T const &k) |
Protected Attributes | |
const T | mEndSymbol |
Items | mItems |
Container representing each node in the Trie.
With this class the container used for storing node item is STL set. Here no extra space will used for storing node item. For searching in each node the time taken is propotional to number of item in the node.
T | Type for each element in the key |
V | Type of the value that the key will be representing |
Cmp | Comparison functor |