Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials |
#include <irrMap.h>
Public Types | |
typedef RBTree< KeyType, ValueType > | Node |
Public Member Functions | |
void | clear () |
Clear the entire tree. | |
Node * | delink (const KeyType &k) |
Removes a node from the tree and returns it. | |
Node * | find (const KeyType &keyToFind) const |
Iterator | getIterator () |
Returns an iterator. | |
ParentFirstIterator | getParentFirstIterator () |
ParentLastIterator | getParentLastIterator () |
Node * | getRoot () const |
bool | insert (const KeyType &keyNew, const ValueType &v) |
Inserts a new node into the tree. | |
bool | isEmpty () const |
map () | |
AccessClass | operator[] (const KeyType &k) |
operator [] for access to elements | |
bool | remove (const KeyType &k) |
Removes a node from the tree and deletes it. | |
void | set (const KeyType &k, const ValueType &v) |
Replaces the value if the key already exists, otherwise inserts a new element. | |
u32 | size () const |
Returns the number of nodes in the tree. | |
~map () | |
Classes | |
class | AccessClass |
class | Iterator |
Normal Iterator. More... | |
class | ParentFirstIterator |
Parent First Iterator. More... | |
class | ParentLastIterator |
Parent Last Iterator. More... | |
class | RBTree |
red/black tree for map |
Definition at line 17 of file irrMap.h.
typedef RBTree<KeyType,ValueType> irr::core::map< KeyType, ValueType >::Node |
irr::core::map< KeyType, ValueType >::map | ( | ) | [inline] |
irr::core::map< KeyType, ValueType >::~map | ( | ) | [inline] |
void irr::core::map< KeyType, ValueType >::clear | ( | ) | [inline] |
Clear the entire tree.
Definition at line 716 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::ParentLastIterator::atEnd(), irr::core::map< KeyType, ValueType >::ParentLastIterator::getNode(), and irr::core::map< KeyType, ValueType >::getParentLastIterator().
Referenced by irr::core::map< KeyType, ValueType >::~map().
Node* irr::core::map< KeyType, ValueType >::delink | ( | const KeyType & | k | ) | [inline] |
Removes a node from the tree and returns it.
The returned node must be deleted by the user
k | the key to remove |
Definition at line 635 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::find().
Node* irr::core::map< KeyType, ValueType >::find | ( | const KeyType & | keyToFind | ) | const [inline] |
Search for a node with the specified key.
keyToFind,: | The key to find |
Definition at line 742 of file irrMap.h.
Referenced by irr::core::map< KeyType, ValueType >::delink(), irr::core::map< KeyType, ValueType >::AccessClass::operator ValueType(), irr::core::map< KeyType, ValueType >::remove(), and irr::core::map< KeyType, ValueType >::set().
Iterator irr::core::map< KeyType, ValueType >::getIterator | ( | ) | [inline] |
Returns an iterator.
Definition at line 780 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::getRoot().
ParentFirstIterator irr::core::map< KeyType, ValueType >::getParentFirstIterator | ( | ) | [inline] |
Returns a ParentFirstIterator. Traverses the tree from top to bottom. Typical usage is when storing the tree structure, because when reading it later (and inserting elements) the tree structure will be the same.
Definition at line 790 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::getRoot().
ParentLastIterator irr::core::map< KeyType, ValueType >::getParentLastIterator | ( | ) | [inline] |
Returns a ParentLastIterator to traverse the tree from bottom to top. Typical usage is when deleting all elements in the tree because you must delete the children before you delete their parent.
Definition at line 800 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::getRoot().
Referenced by irr::core::map< KeyType, ValueType >::clear().
Node* irr::core::map< KeyType, ValueType >::getRoot | ( | ) | const [inline] |
Gets the root element.
Definition at line 764 of file irrMap.h.
Referenced by irr::core::map< KeyType, ValueType >::getIterator(), irr::core::map< KeyType, ValueType >::getParentFirstIterator(), and irr::core::map< KeyType, ValueType >::getParentLastIterator().
bool irr::core::map< KeyType, ValueType >::insert | ( | const KeyType & | keyNew, | |
const ValueType & | v | |||
) | [inline] |
Inserts a new node into the tree.
keyNew,: | the index for this value | |
v,: | the value to insert |
Definition at line 540 of file irrMap.h.
References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX.
Referenced by irr::core::map< KeyType, ValueType >::set().
bool irr::core::map< KeyType, ValueType >::isEmpty | ( | ) | const [inline] |
Is the tree empty?
Definition at line 733 of file irrMap.h.
References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX.
AccessClass irr::core::map< KeyType, ValueType >::operator[] | ( | const KeyType & | k | ) | [inline] |
bool irr::core::map< KeyType, ValueType >::remove | ( | const KeyType & | k | ) | [inline] |
Removes a node from the tree and deletes it.
Definition at line 674 of file irrMap.h.
References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and irr::core::map< KeyType, ValueType >::find().
void irr::core::map< KeyType, ValueType >::set | ( | const KeyType & | k, | |
const ValueType & | v | |||
) | [inline] |
Replaces the value if the key already exists, otherwise inserts a new element.
k | The index for this value | |
v | The new value of |
Definition at line 622 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::find(), and irr::core::map< KeyType, ValueType >::insert().
Referenced by irr::core::map< KeyType, ValueType >::AccessClass::operator=().
u32 irr::core::map< KeyType, ValueType >::size | ( | ) | const [inline] |
The Irrlicht
Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated
on Sun Jan 10 09:24:09 2010 by Doxygen
(1.5.6) |