|
ORIGINAL
|
Abstract base class for double-direction iterators. More...
#include <doubleDirectionIterator.h>


Public Member Functions | |
| doubleDirectionIterator (const doubleDirectionIterator &other) | |
| Copy constructor for doubleDirectionIterator. | |
| doubleDirectionIterator & | operator= (const doubleDirectionIterator &other) |
| Copy assignment operator for doubleDirectionIterator. | |
| doubleDirectionIterator * | clone () const override |
| Creates a heap-allocated copy of the iterator. | |
| bool | hasPrev () const override |
| Checks if the iterator can move backward. | |
| void | prev () const override |
| Moves the iterator to the previous element. | |
Public Member Functions inherited from original::stepIterator< TYPE > | |
| stepIterator (const stepIterator &other) | |
| Copy constructor for stepIterator. | |
| stepIterator & | operator= (const stepIterator &other) |
| Copy assignment operator for stepIterator. | |
| stepIterator * | clone () const override |
| Creates a heap-allocated copy of the iterator. | |
| bool | hasNext () const override |
| Checks if the iterator can move forward. | |
| bool | hasPrev () const override |
| Checks if the iterator can move backward. | |
| bool | atPrev (const iterator< TYPE > *other) const override |
| Checks if the current iterator is at the previous position relative to another iterator. | |
| bool | atNext (const iterator< TYPE > *other) const override |
| Checks if the current iterator is at the next position relative to another iterator. | |
| void | next () const override |
| Advances to the next position in the container. | |
| void | prev () const override |
| Retreats to the previous position in the container. | |
| void | operator+= (integer steps) const override |
| Moves forward by a specified number of steps. | |
| void | operator-= (integer steps) const override |
| Moves backward by a specified number of steps. | |
| integer | operator- (const iterator< TYPE > &other) const override |
| Calculates the number of steps between the current iterator and another iterator. | |
| stepIterator * | getNext () const override |
| Creates a new iterator pointing to the next element. | |
| iterator< TYPE > * | getPrev () const override |
| Creates a new iterator pointing to the previous element. | |
| TYPE & | get () override |
| Gets the reference of current element in the container. | |
| TYPE | get () const override |
| Gets the current element in the container. | |
| void | set (const TYPE &data) override |
| Sets the value of the current element. | |
| bool | isValid () const override |
| Checks if the iterator is valid. | |
| std::string | className () const override |
| Returns the class name of the iterator. | |
Public Member Functions inherited from original::baseIterator< 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. | |
| operator bool () const | |
| Checks if the iterator is valid (i.e., points to a valid 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 TYPE | getElem () const |
| Returns a copy of the element. | |
| 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. | |
Protected Member Functions | |
| doubleDirectionIterator (wrapper< TYPE > *ptr) | |
| Protected constructor for doubleDirectionIterator. | |
Protected Member Functions inherited from original::stepIterator< TYPE > | |
| stepIterator (wrapper< TYPE > *ptr) | |
| Protected constructor for derived classes. | |
| bool | equalPtr (const iterator< TYPE > *other) const override |
| Equality comparison for two iterators. | |
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. | |
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 |
Static Protected Member Functions inherited from original::stepIterator< TYPE > | |
| static integer | ptrDistance (const stepIterator *start, const stepIterator *end) |
| Calculates the distance between two iterators. | |
Protected Attributes inherited from original::stepIterator< TYPE > | |
| wrapper< TYPE > * | _ptr |
| Pointer to the current wrapper. | |
Abstract base class for double-direction iterators.
| TYPE | Type of elements being iterated |
Implements core functionality for iterators that can traverse elements in both directions (forward and backward) with single-step movements. This class extends the stepIterator and provides support for both forward and backward iteration.
|
explicitprotected |
Protected constructor for doubleDirectionIterator.
| ptr | Raw pointer to the element being iterated |
| original::doubleDirectionIterator< TYPE >::doubleDirectionIterator | ( | const doubleDirectionIterator< TYPE > & | other | ) |
Copy constructor for doubleDirectionIterator.
| other | The iterator to copy from |
|
overridevirtual |
Creates a heap-allocated copy of the iterator.
Implements original::baseIterator< TYPE >.
Reimplemented in original::chain< TYPE, ALLOC >::Iterator.
|
overridevirtual |
Checks if the iterator can move backward.
Implements original::iterator< TYPE >.
| original::doubleDirectionIterator< TYPE > & original::doubleDirectionIterator< TYPE >::operator= | ( | const doubleDirectionIterator< TYPE > & | other | ) |
Copy assignment operator for doubleDirectionIterator.
| other | The iterator to copy from |
|
overridevirtual |
Moves the iterator to the previous element.
| nullPointerError | if the iterator is invalid |
Implements original::iterator< TYPE >.