MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
Mezzanine::VectorItems< T, V, Cmp, Max, M > Class Template Reference

Container representing each node in the Trie. More...

#include <trie.h>

+ Collaboration diagram for Mezzanine::VectorItems< T, V, Cmp, Max, M >:

Public Types

typedef Items::const_iterator const_iterator
 
typedef NodeClass::EndNodeItemClass EndNodeItemClass
 
typedef NodeItem< T, V, Cmp,
VectorItems< T, V, Cmp, Max, M > > 
Item
 
typedef std::vector< Item * > Items
 
typedef Items::iterator iterator
 
typedef Node< T, V, Cmp,
VectorItems< T, V, Cmp, Max, M > > 
NodeClass
 
typedef NodeClass::NodeItemClass NodeItemClass
 

Public Member Functions

 VectorItems (T const &endSymbol)
 
void assignItem (T k, Item *i)
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
NodeItemClasscreateNodeItem (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)
 
ItemgetItem (T const &k)
 
const ItemgetItem (T const &k) const
 
std::pair< Item *, bool > insertItem (T const &k)
 

Protected Attributes

const T mEndSymbol
 
Items mItems
 
mSymolToIndex
 

Detailed Description

template<typename T, typename V, typename Cmp, int Max = 256, typename M = SymbolToIndexMapper<T>>
class Mezzanine::VectorItems< T, V, Cmp, Max, M >

Container representing each node in the Trie.

With this class the container used for storing node item is STL vector. Here each node will use a space propotional to Max. For searching only constant time taken at each node.

Template Parameters
TType for each element in the key
VType of the value that the key will be representing
CmpComparison functor
MaxMaximum element that a Trie node can have

Definition at line 816 of file trie.h.


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