map template for associative arrays using a red-black tree More...
#include <irrMap.h>
map template for associative arrays using a red-black tree
typedef RBTree<KeyType,ValueType> irr::core::map< KeyType, ValueType >::Node |
irr::core::map< KeyType, ValueType >::map | ( | ) | [inline] |
irr::core::map< KeyType, ValueType >::~map | ( | ) | [inline] |
Definition at line 676 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::clear().
void irr::core::map< KeyType, ValueType >::clear | ( | ) | [inline] |
Clear the entire tree.
Definition at line 872 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 784 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::find().
bool irr::core::map< KeyType, ValueType >::empty | ( | ) | const [inline] |
Is the tree empty?
Definition at line 889 of file irrMap.h.
References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX.
Referenced by irr::core::map< KeyType, ValueType >::isEmpty().
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 904 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().
ConstIterator irr::core::map< KeyType, ValueType >::getConstIterator | ( | ) | const [inline] |
Returns a Constiterator.
Definition at line 960 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::getRoot().
Iterator irr::core::map< KeyType, ValueType >::getIterator | ( | ) | const [inline] |
Returns an iterator.
Definition at line 953 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::getRoot().
ParentFirstIterator irr::core::map< KeyType, ValueType >::getParentFirstIterator | ( | ) | const [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 971 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::getRoot().
ParentLastIterator irr::core::map< KeyType, ValueType >::getParentLastIterator | ( | ) | const [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 982 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 926 of file irrMap.h.
Referenced by irr::core::map< KeyType, ValueType >::getConstIterator(), 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 689 of file irrMap.h.
References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX.
Referenced by irr::core::map< KeyType, ValueType >::set().
_IRR_DEPRECATED_ bool irr::core::map< KeyType, ValueType >::isEmpty | ( | ) | const [inline] |
Definition at line 896 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::empty().
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 823 of file irrMap.h.
References irr::core::map< KeyType, ValueType >::find().
bool irr::core::map< KeyType, ValueType >::remove | ( | Node * | p | ) | [inline] |
Removes a node from the tree and deletes it.
Definition at line 831 of file irrMap.h.
References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX.
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 771 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] |
void irr::core::map< KeyType, ValueType >::swap | ( | map< KeyType, ValueType > & | other | ) | [inline] |
Swap the content of this map container with the content of another map.
Afterwards this object will contain the content of the other object and the other object will contain the content of this object. Iterators will afterwards be valid for the swapped object.
other | Swap content with this object |