#include "CTBgset.hxx"
Inheritance diagram for CTBgset:
Public Types | |
typedef CTBgset< K, V, C, T, AK, AV > | Gset |
typedef CTBgsetNode< K, V, C, T, AK, AV > | Node |
typedef CTBgsetIterator< K, V, C, T, AK, AV > | Iterator |
typedef CTBgsetBrowser< K, V, C, T, AK, AV > | Browser |
Public Methods | |
CTBgset () | |
CTBgset (const CTBgset< K, V, C, T, AK, AV > &rhs) | |
~CTBgset () | |
bool | Insert (const T &obj) |
CTBgsetIterator< K, V, C, T, AK, AV > | Find (const K &key) |
CTBgsetBrowser< K, V, C, T, AK, AV > | Find (const K &key) const |
CTBgsetIterator< K, V, C, T, AK, AV > | FindLessEqual (const K &key, bool &b_found) |
CTBgsetBrowser< K, V, C, T, AK, AV > | FindLessEqual (const K &key, bool &b_found) const |
CTBgsetIterator< K, V, C, T, AK, AV > | FindGreaterEqual (const K &key, bool &b_found) |
CTBgsetBrowser< K, V, C, T, AK, AV > | FindGreaterEqual (const K &key, bool &b_found) const |
bool | Delete (const K &key) |
bool | Delete (const CTBgsetIterator< K, V, C, T, AK, AV > &p) |
void | Clear () |
CTBgsetIterator< K, V, C, T, AK, AV > | First () |
CTBgsetBrowser< K, V, C, T, AK, AV > | First () const |
CTBgsetIterator< K, V, C, T, AK, AV > | Last () |
CTBgsetBrowser< K, V, C, T, AK, AV > | Last () const |
CTBint | Size () const |
void | Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const |
CTBgset< K, V, C, T, AK, AV > & | operator= (const CTBgset< K, V, C, T, AK, AV > &rhs) |
operator bool () const | |
Private Methods | |
CTBgsetNode< K, V, C, T, AK, AV > * | LocateMatchOrBound (const K &key, int &i_mtype) const |
CTBgsetNode< K, V, C, T, AK, AV > * | LocateMatchOrPrev (const K &key, bool &b_found) const |
CTBgsetNode< K, V, C, T, AK, AV > * | LocateMatchOrNext (const K &key, bool &b_found) const |
void | InsertNode (CTBgsetNode< K, V, C, T, AK, AV > *p_node, CTBgsetNode< K, V, C, T, AK, AV > *p_parent, int i_ctype) |
void | RemoveNode (CTBgsetNode< K, V, C, T, AK, AV > *p_node) |
Definition at line 25 of file CTBgset.hxx.
|
Definition at line 28 of file CTBgset.hxx. |
|
Definition at line 29 of file CTBgset.hxx. Referenced by Insert().
|
|
Definition at line 30 of file CTBgset.hxx. Referenced by Find(), FindGreaterEqual(), FindLessEqual(), First(), and Last().
|
|
Definition at line 31 of file CTBgset.hxx. Referenced by Find(), FindGreaterEqual(), FindLessEqual(), First(), and Last().
|
|
Default constructor.
Definition at line 18 of file CTBgset.icc. |
|
Copy constructor.
Definition at line 37 of file CTBgset.icc. |
|
Destructor.
The destructor releases the whole gset without executing the comparison operator. This is important when gset's are released where Definition at line 30 of file CTBgset.icc. |
|
Insert an object.
Definition at line 29 of file CTBgset.cxx. |
|
Find entry with key key.
Definition at line 45 of file CTBgset.cxx. |
|
Find entry with key key.
Definition at line 59 of file CTBgset.cxx. |
|
Find entry with key key, return previous if no match found.
Definition at line 44 of file CTBgset.icc. |
|
Find entry with key key, return previous if no match found.
Definition at line 54 of file CTBgset.icc. |
|
Find entry with key key, return next if no match found.
Definition at line 64 of file CTBgset.icc. |
|
Find entry with key key, return next if no match found.
Definition at line 74 of file CTBgset.icc. |
|
Delete entry with key key. Returns false if no entry with key key is found. Definition at line 76 of file CTBgset.cxx. |
|
Delete entry Returns false if iterator p is not valid. Definition at line 94 of file CTBgset.cxx. |
|
Delete all entries of the gset.
Reimplemented from CTBbtree. Definition at line 107 of file CTBgset.cxx. |
|
Return iterator to first entry.
Definition at line 84 of file CTBgset.icc. |
|
Return browser to first entry.
Reimplemented from CTBbtree. Definition at line 93 of file CTBgset.icc. |
|
Return iterator to last entry.
Definition at line 102 of file CTBgset.icc. |
|
Return browser to first entry.
Reimplemented from CTBbtree. Definition at line 111 of file CTBgset.icc. |
|
Return number of entries (see size).
Reimplemented from CTBbtree. Definition at line 120 of file CTBgset.icc. |
|
Dump.
Reimplemented from CTBbtree. Definition at line 129 of file CTBgset.icc. |
|
Delete all old entries, copy all entries from rhs.
Definition at line 140 of file CTBgset.icc. |
|
Definition at line 151 of file CTBgset.icc. |
|
Locate nearest entry. Returns a pointer to a node with key key or, if none exists, to a node with a key immediately before or after key. The parameter i_mtype is set to 0 in case of a match, -1 if key<node and +1 if key>node. A null pointer is returned if the gset is empty. Definition at line 124 of file CTBgset.cxx. Referenced by Delete(), Find(), Insert(), LocateMatchOrNext(), and LocateMatchOrPrev().
|
|
Locate entry with key key, return previous if no match found.
Definition at line 165 of file CTBgset.cxx. Referenced by FindLessEqual().
|
|
Locate entry by key key, return next if no match found.
Definition at line 183 of file CTBgset.cxx. Referenced by FindGreaterEqual().
|
|
Insert node into gset. The node p_node is added as child of node p_parent, either as left child if i_ctype is <0 or as right child if i_ctype is >0. If p_node is 0 and i_ctype is 0 the node is inserted as root node. Definition at line 165 of file CTBgset.icc. Referenced by Insert().
|
|
Remove node from gset.
Definition at line 178 of file CTBgset.icc. |