MySQL 8.0.39
Source Code Documentation
|
Iterator over a Storage object. More...
#include <storage.h>
Public Member Functions | |
Iterator () | |
Default constructor. More... | |
Iterator (const Storage *storage, const Element *element) | |
Constructor where the Storage object to iterate over and the starting position are provided. More... | |
Iterator (const Iterator &)=default | |
Copy-construct from another iterator. More... | |
Element * | operator* () const |
Dereference the iterator to the element it points to. More... | |
Iterator & | operator= (const Element *element) |
Assign a new position within the same Storage object. More... | |
Iterator & | operator= (const Iterator &)=default |
Copy-assign from another iterator. More... | |
bool | operator== (const Iterator &rhs) const |
Compare with another iterator. More... | |
bool | operator!= (const Iterator &rhs) const |
Compare with another iterator. More... | |
Iterator & | operator++ () |
Advance the iterator one element forward. More... | |
Iterator & | operator-- () |
Recede the iterator one element backwards. More... | |
Private Attributes | |
Storage * | m_storage |
Storage over which the iterator operates. More... | |
Element * | m_element |
Current element. More... | |
Iterator over a Storage object.
|
inline |
Default constructor.
This creates a hollow iterator object, that must be assigned afterwards.
Constructor where the Storage object to iterate over and the starting position are provided.
The iterator is fully initialized after this and ready for iteration.
[in] | storage | Storage object to iterate over. |
[in] | element | Initial position of the iterator, must point to an element inside `storage`. |
|
default |
Copy-construct from another iterator.
|
inline |
Compare with another iterator.
For two iterators to be equal, they must be positioned on the same element in the same storage.
[in] | rhs | Iterator to compare with. |
|
inline |
Dereference the iterator to the element it points to.
|
inline |
Advance the iterator one element forward.
If the iterator points to end() before this call, then the behavior is undefined.
|
inline |
Recede the iterator one element backwards.
If the iterator points to begin() before this call, then the behavior is undefined.
|
inline |
Assign a new position within the same Storage object.
[in] | element | New position for the iterator. |
Copy-assign from another iterator.
|
inline |
Compare with another iterator.
For two iterators to be equal, they must be positioned on the same element in the same storage.
[in] | rhs | Iterator to compare with. |
|
private |
Current element.
|
private |
Storage over which the iterator operates.