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


Public Member Functions | |
| Iterator (const Iterator &other) | |
| Copy constructor. | |
| Iterator & | operator= (const Iterator &other) |
| Copy assignment operator. | |
| Iterator * | clone () const override |
| Creates a copy of this iterator. | |
| std::string | className () const override |
| Gets iterator class name. | |
| void | operator+= (integer steps) const override |
| Advances iterator by steps. | |
| void | operator-= (integer steps) const override |
| Rewinds iterator by steps. | |
| integer | operator- (const iterator< couple< const K_TYPE, V_TYPE > > &other) const override |
| Not supported (throws unSupportedMethodError) | |
| bool | hasNext () const override |
| Checks if more elements exist in forward direction. | |
| bool | hasPrev () const override |
| Checks if more elements exist in backward direction. | |
| bool | atPrev (const iterator< couple< const K_TYPE, V_TYPE > > *other) const override |
| Checks if other is previous to this. | |
| bool | atNext (const iterator< couple< const K_TYPE, V_TYPE > > *other) const override |
| Checks if other is next to this. | |
| void | next () const override |
| Moves to next element. | |
| void | prev () const override |
| Moves to previous element. | |
| Iterator * | getPrev () const override |
| Gets previous iterator. | |
| couple< const K_TYPE, V_TYPE > & | get () override |
| Gets current element (non-const) | |
| couple< const K_TYPE, V_TYPE > | get () const override |
| Gets current element (const) | |
| void | set (const couple< const K_TYPE, V_TYPE > &data) override |
| Not supported. | |
| bool | isValid () const override |
| Checks if iterator is valid. | |
Public Member Functions inherited from original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator | |
| 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. | |
Public Member Functions inherited from original::baseIterator< couple< const K_TYPE, V_TYPE > > | |
| ~baseIterator () override=default | |
| Virtual destructor for proper cleanup of derived objects. | |
Public Member Functions inherited from original::iterator< TYPE > | |
| TYPE & | operator* () |
| Dereferences the iterator to get the element. | |
| TYPE | operator* () const |
| Dereferences the iterator to get a copy of the element. | |
| void | operator++ () const |
| Moves the iterator forward by one position. | |
| void | operator++ (int postfix) const |
| Moves the iterator forward by one position (postfix). | |
| void | operator-- () const |
| Moves the iterator backward by one position. | |
| void | operator-- (int postfix) const |
| Moves the iterator backward by one position (postfix). | |
| integer | compareTo (const iterator &other) const override |
| Compares two iterators to determine their relative positions. | |
| virtual integer | operator- (const iterator &other) const =0 |
| Returns the distance between this iterator and another iterator. | |
| operator bool () const | |
| Checks if the iterator is valid (i.e., points to a valid element). | |
| virtual bool | atPrev (const iterator *other) const =0 |
| Checks if this iterator is positioned at the previous element. | |
| virtual bool | atNext (const iterator *other) const =0 |
| Checks if this iterator is positioned at the next element. | |
| bool | atPrev (const iterator &other) const |
| Checks if this iterator is positioned at the previous element. | |
| bool | atNext (const iterator &other) const |
| Checks if this iterator is positioned at the next element. | |
| virtual iterator * | getNext () const |
| Returns a new iterator pointing to the next element. | |
| virtual TYPE | getElem () const |
| Returns a copy of the element. | |
| virtual void | set (const TYPE &data)=0 |
| Sets the element pointed to by the iterator. | |
| bool | equal (const iterator *other) const |
| Checks if two iterators are equal. | |
| bool | equal (const iterator &other) const |
| Checks if two iterators are equal. | |
| std::string | toString (bool enter) const override |
| Returns a string representation of the iterator. | |
| ~iterator () override=default | |
| Virtual destructor for proper cleanup of derived objects. | |
Public Member Functions inherited from original::printable | |
| operator std::string () const | |
| Explicit conversion to std::string. | |
| operator const char * () const | |
| Explicit conversion to C-style string. | |
| const char * | toCString (bool enter) const |
| Direct C-string access with formatting control. | |
| template<typename TYPE > | |
| auto | formatString (const TYPE &t) -> std::string |
| template<typename TYPE > | |
| auto | formatCString (const TYPE &t) -> const char * |
| template<typename TYPE > | |
| auto | formatEnum (const TYPE &t) -> std::string |
| template<typename TYPE > | |
| auto | formatString (TYPE *const &ptr) -> std::string |
Public Member Functions inherited from original::cloneable | |
| ~cloneable () override=default | |
| Virtual destructor for cloneable. | |
Public Member Functions inherited from original::baseCloneable< cloneable > | |
| virtual | ~baseCloneable ()=default |
| Virtual destructor for baseCloneable. | |
Public Member Functions inherited from original::comparable< iterator< TYPE > > | |
| bool | operator== (const iterator< TYPE > &other) const |
| Checks if the current object is equal to another. | |
| bool | operator!= (const iterator< TYPE > &other) const |
| Checks if the current object is not equal to another. | |
| bool | operator< (const iterator< TYPE > &other) const |
| Checks if the current object is less than another. | |
| bool | operator> (const iterator< TYPE > &other) const |
| Checks if the current object is greater than another. | |
| bool | operator<= (const iterator< TYPE > &other) const |
| Checks if the current object is less than or equal to another. | |
| bool | operator>= (const iterator< TYPE > &other) const |
| Checks if the current object is greater than or equal to another. | |
| virtual | ~comparable ()=default |
| Virtual destructor for proper cleanup of derived objects. | |
Friends | |
| class | treeMap |
Additional Inherited Members | |
Static Public Member Functions inherited from original::printable | |
| template<typename TYPE > | |
| static std::string | formatString (const TYPE &t) |
| Universal value-to-string conversion with type-specific formatting. | |
| template<Printable TYPE> | |
| static std::string | formatString (const TYPE &t) |
| Specialization for types deriving from printable. | |
| template<EnumType TYPE> | |
| static std::string | formatString (const TYPE &t) |
| Specialization for enum types with type-safe formatting. | |
| template<typename TYPE > | |
| static std::string | formatString (TYPE *const &ptr) |
| Pointer-specific formatting with null safety. | |
| template<typename TYPE > | |
| static const char * | formatCString (const TYPE &t) |
| C-string cache for temporary usage with static storage. | |
| template<typename TYPE > | |
| static std::string | formatEnum (const TYPE &t) |
| Enum formatting utility with underlying value extraction. | |
| template<> | |
| auto | formatString (const char &t) -> std::string |
| template<> | |
| auto | formatString (const bool &t) -> std::string |
| template<> | |
| auto | formatString (const char *const &ptr) -> std::string |
Protected Member Functions inherited from original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator | |
| Iterator (RBTree *tree=nullptr, RBNode *cur=nullptr) | |
| Constructs iterator. | |
| Iterator (const Iterator &other) | |
| Copy constructor. | |
| Iterator & | operator= (const Iterator &other) |
| Copy assignment operator. | |
Protected Member Functions inherited from original::iterator< TYPE > | |
| virtual bool | equalPtr (const iterator *other) const =0 |
| Checks if two iterators point to the same underlying element. | |
Protected Member Functions inherited from original::cloneable | |
| cloneable ()=default | |
| Default constructor for cloneable. | |
Protected Member Functions inherited from original::baseCloneable< cloneable > | |
| baseCloneable ()=default | |
| Default constructor for baseCloneable. | |
Protected Attributes inherited from original::RBTree< K_TYPE, V_TYPE, ALLOC, Compare >::Iterator | |
| RBTree * | tree_ |
| Owning tree. | |
| RBNode * | cur_ |
| Current node. | |
Bidirectional iterator for treeMap.
Provides iteration over treeMap elements while maintaining:
Iterator Characteristics:
Copy constructor.
| other | Iterator to copy |
|
override |
Checks if other is previous to this.
| other | Iterator to check |
|
overridevirtual |
|
overridevirtual |
Creates a copy of this iterator.
Implements original::baseIterator< couple< const K_TYPE, V_TYPE > >.
|
overridevirtual |
Gets current element (const)
Implements original::iterator< TYPE >.
|
overridevirtual |
Gets current element (non-const)
Implements original::iterator< TYPE >.
|
overridevirtual |
Gets previous iterator.
Implements original::iterator< TYPE >.
|
overridevirtual |
Checks if more elements exist in forward direction.
Implements original::iterator< TYPE >.
|
overridevirtual |
Checks if more elements exist in backward direction.
Implements original::iterator< TYPE >.
|
overridevirtual |
Checks if iterator is valid.
Implements original::iterator< TYPE >.
|
overridevirtual |
Moves to next element.
Implements original::iterator< TYPE >.
|
overridevirtual |
Advances iterator by steps.
| steps | Number of positions to advance |
Implements original::iterator< TYPE >.
|
overridevirtual |
Rewinds iterator by steps.
| steps | Number of positions to rewind |
Implements original::iterator< TYPE >.
| original::treeMap< K_TYPE, V_TYPE, Compare, ALLOC >::Iterator & original::treeMap< K_TYPE, V_TYPE, Compare, ALLOC >::Iterator::operator= | ( | const Iterator & | other | ) |
|
overridevirtual |
Moves to previous element.
Implements original::iterator< TYPE >.
|
override |
Not supported.
| unSupportedMethodError |