#include <FMTree.h>
Public Member Functions | |
| tree () | |
| Constructor. | |
| ~tree () | |
| Destructor. | |
| iterator | begin () |
| Retrieves the first ordered element within the tree. | |
| const_iterator | begin () const |
| See above. | |
| iterator | end () |
| Retrieves an iterator that points just passed the last ordered element within the tree. | |
| const_iterator | end () const |
| See above. | |
| iterator | last () |
| Retrieves the last ordered element within the tree. | |
| const_iterator | last () const |
| See above. | |
| iterator | find (const KEY &key) |
| Retrieves an existing data element using its key. | |
| const_iterator | find (const KEY &key) const |
| See above. | |
| iterator | insert (const KEY &key, const DATA &data) |
| Inserts a new data element with its key. | |
| DATA & | operator[] (const KEY &k) |
| Retrieves a data element using its key. | |
| const DATA & | operator[] (const KEY &k) const |
| See above. | |
| void | erase (const KEY &key) |
| Removes a data element from the tree. | |
| void | erase (const iterator &it) |
| Removes a data element from the tree. | |
| bool | empty () const |
| Retrieves whether the tree contains any data nodes. | |
| size_t | size () const |
| Retrieves the number of data nodes contained in the tree. | |
| void | clear () |
| Removes all the data nodes from the tree. | |
| tree< KEY, DATA > & | operator= (const tree< KEY, DATA > ©) |
| Copy constructor. | |
Classes | |
| class | const_iterator |
| A tree constant-element iterator. More... | |
| class | iterator |
| A tree element iterator. More... | |
| class | node |
Intentionally has an interface similar to the standard C++ tree class. It's implement should be very similar yet more lightweight.
|
|||||||||
|
Retrieves the first ordered element within the tree.
|
|
|||||||||
|
Removes all the data nodes from the tree. This effectively prunes at the tree root. |
|
|||||||||
|
Retrieves whether the tree contains any data nodes.
|
|
|||||||||
|
Retrieves an iterator that points just passed the last ordered element within the tree.
|
|
||||||||||
|
Removes a data element from the tree.
|
|
||||||||||
|
Removes a data element from the tree.
|
|
||||||||||
|
Retrieves an existing data element using its key.
|
|
||||||||||||||||
|
Inserts a new data element with its key. If the key already exists within the tree, the old data element will be overwritten using the new data element.
|
|
|||||||||
|
Retrieves the last ordered element within the tree.
|
|
||||||||||
|
Copy constructor. Clones another tree into this one. This is a bad function: it costs too much performance, avoid at all costs!
|
|
||||||||||
|
Retrieves a data element using its key.
|
|
|||||||||
|
Retrieves the number of data nodes contained in the tree.
|
1.4.6-NO