#include <cmt_map.h>
Public Member Functions | |
cmt_vmap () | |
Constructor. | |
~cmt_vmap () | |
Destructor. | |
void | clear () |
clear: erase everything from this map | |
void | add (const K &key, T &t) |
Add an entry. | |
bool | has (const K &key) const |
Finds whether there is a node holding that key. | |
const T * | find (const K &key) const |
Finds the value associated with that key. | |
const cmt_vnode< K, T > * | find_node (const K &key) const |
Finds the node containing the value associated with that key. | |
Private Attributes | |
cmt_vnode< K, T > * | m_top |
|
Constructor.
Definition at line 446 of file cmt_map.h.
00446 : m_top (0) 00447 { 00448 } |
|
Destructor.
Definition at line 453 of file cmt_map.h.
00454 { 00455 clear (); 00456 } |
|
Add an entry. Existing entries with the same key will be overridden Definition at line 475 of file cmt_map.h.
00476 { 00477 if (m_top == 0) 00478 { 00479 m_top = new cmt_vnode<K, T> (key, t); 00480 } 00481 else 00482 { 00483 m_top->add (key, t); 00484 } 00485 } |
|
clear: erase everything from this map
Definition at line 461 of file cmt_map.h. Referenced by cmt_vmap< cmt_string, int >::~cmt_vmap().
|
|
Finds the value associated with that key. Returns 0 if not found Definition at line 506 of file cmt_map.h.
|
|
Finds the node containing the value associated with that key. Returns 0 if not found Definition at line 522 of file cmt_map.h.
|
|
Finds whether there is a node holding that key.
Definition at line 490 of file cmt_map.h.
|
|
|