|
ORIGINAL
|
Bidirectional iterator for RBTree. More...
#include <RBTree.h>


Public Member Functions | |
| bool | hasNext () const |
| Checks if more elements exist forward. | |
| bool | hasPrev () const |
| Checks if more elements exist backward. | |
| void | next () const |
| Moves to next element. | |
| void | prev () const |
| Moves to previous element. | |
| void | operator+= (integer steps) const |
| Advances iterator by steps. | |
| void | operator-= (integer steps) const |
| Moves iterator backward by steps. | |
| couple< const K_TYPE, V_TYPE > & | get () |
| Gets current element (non-const) | |
| couple< const K_TYPE, V_TYPE > | get () const |
| Gets current element (const) | |
| bool | isValid () const |
| Checks if iterator is valid. | |
Protected Member Functions | |
| Iterator (RBTree *tree=nullptr, RBNode *cur=nullptr) | |
| Constructs iterator. | |
| Iterator (const Iterator &other) | |
| Copy constructor. | |
| Iterator & | operator= (const Iterator &other) |
| Copy assignment operator. | |
Protected Attributes | |
| RBTree * | tree_ |
| Owning tree. | |
| RBNode * | cur_ |
| Current node. | |
Bidirectional iterator for RBTree.
Provides iteration over tree elements in sorted order
|
explicitprotected |
Constructs iterator.
| tree | Owning tree |
| cur | Current node |
| original::couple< const K_TYPE, V_TYPE > & original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator::get | ( | ) |
Gets current element (non-const)
| original::couple< const K_TYPE, V_TYPE > original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator::get | ( | ) | const |
Gets current element (const)
| bool original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator::hasNext | ( | ) | const |
Checks if more elements exist forward.
| bool original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator::hasPrev | ( | ) | const |
Checks if more elements exist backward.
| bool original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator::isValid | ( | ) | const |
Checks if iterator is valid.
| void original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator::operator+= | ( | integer | steps | ) | const |
Advances iterator by steps.
| steps | Number of positions to advance |
| void original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator::operator-= | ( | integer | steps | ) | const |
Moves iterator backward by steps.
| steps | Number of positions to move back |