![]() |
Public API Reference |
#include <bintree.h>
Public Methods | |
| csTree (int blocksize=15) | |
| Construct a tree that allocates memory for nodes in blocks of the given size. More... | |
| csTree (const csTree< T > &other) | |
| Copy constructor. More... | |
| void | PopulateWith (const csArray< uint32 > &keys, const csArray< T > &values) |
| Populate an empty tree with entries from a sorted array. More... | |
| void | Traverse (TraverseFunc *func, void *some) const |
| Call a callback function once for every entry in the tree. More... | |
| void | Put (uint32 key, const T &value) |
| Put an entry into the tree, overwriting if the key already exists. More... | |
| T & | Find (uint32 key) |
| Find the given entry in the tree, creating it if it doesn't exist. More... | |
| const T & | Find (uint32 key) const |
| Find the given entry in the tree, returning 0 if it doesn't exist,. More... | |
| bool | Delete (uint32 key) |
| Delete the given entry from the tree, returning false if it doesn't exist. More... | |
| bool | DeleteAll () |
| Delete all the entries from the tree. More... | |
| int | GetSize () const |
| Get the number of entries in the tree. More... | |
Definition at line 27 of file bintree.h.
|
||||||||||
|
Construct a tree that allocates memory for nodes in blocks of the given size.
|
|
||||||||||
|
Copy constructor.
Definition at line 115 of file bintree.h. References csBlockAllocator::Alloc. |
|
||||||||||
|
Delete the given entry from the tree, returning false if it doesn't exist.
Definition at line 229 of file bintree.h. References csBlockAllocator::Free, and uint32. |
|
|||||||||
|
Delete all the entries from the tree.
|
|
||||||||||
|
Find the given entry in the tree, returning 0 if it doesn't exist,.
Definition at line 209 of file bintree.h. References uint32. |
|
||||||||||
|
Find the given entry in the tree, creating it if it doesn't exist.
Definition at line 175 of file bintree.h. References uint32. |
|
|||||||||
|
Get the number of entries in the tree.
|
|
||||||||||||||||
|
Populate an empty tree with entries from a sorted array.
Definition at line 123 of file bintree.h. References csArray::Length. |
|
||||||||||||||||
|
Put an entry into the tree, overwriting if the key already exists.
Definition at line 137 of file bintree.h. References uint32. |
|
||||||||||||||||
|
Call a callback function once for every entry in the tree.
|