◆ Iterator()
template<typename T >
frequency_list< T >::Iterator::Iterator |
( |
const std::shared_ptr< node > & | ptr | ) |
|
|
inlineexplicitnoexcept |
Iterator class for a linked list.
The Iterator class provides an iterator for traversing a linked list.
◆ operator!=()
Inequality operator for the Iterator class.
This operator checks if two iterators are not equal by comparing their current nodes.
- Parameters
-
it | The other Iterator object to compare with. |
- Returns
- true if the iterators are not equal, false otherwise.
◆ operator*()
Dereference operator for the Iterator class.
- Returns
- The data pointed to by the current node.
◆ operator++() [1/2]
Pre-increment operator for the Iterator class.
This operator overloads the pre-increment operator (++). It increments the iterator to the next node and returns a reference to the updated iterator.
- Returns
- A reference to the updated iterator.
◆ operator++() [2/2]
Post-increment operator for the Iterator class.
This operator overloads the post-increment operator (++). It increments the iterator to the next node and returns a copy of the iterator before the increment.
- Returns
- A copy of the iterator before the increment.
◆ operator--() [1/2]
Pre-increment – operator for the Iterator class. This operator overloads the pre-increment operator (–). It increments the iterator to the next node and returns a reference to the updated iterator.
- Returns
- Iterator&
◆ operator--() [2/2]
Post-increment –operator for the Iterator class. This operator overloads the post-increment operator (–). It increments the iterator to the next node and returns a copy of the iterator before the increment.
- Returns
- Iterator
◆ operator=()
Assignment operator for the Iterator class.
It assigns the value of the given shared pointer to the current node of the iterator and returns a reference to the updated iterator.
- Parameters
-
ptr | The shared pointer to assign. |
- Returns
- A reference to the updated iterator.
◆ operator==()
Equality operator for the Iterator class.
This operator checks if two iterators are equal by comparing their current nodes.
- Parameters
-
it | The other Iterator object to compare with. |
- Returns
- true if the iterators are equal, false otherwise.
The documentation for this class was generated from the following file: