![]() |
Gaia-ECS v1.0.0
A simple and powerful entity component system
|
Constant random-access iterator over sparse-storage values. More...
#include <sparse_storage.h>
Public Types | |
| using | iterator_category = core::random_access_iterator_tag |
| Iterator category. | |
| using | value_type = T |
| Stored value type. | |
| using | pointer = const T * |
| Pointer to a stored value. | |
| using | reference = const T & |
| Reference to a stored value. | |
| using | difference_type = detail::difference_type |
| Type used for iterator distances. | |
| using | size_type = detail::size_type |
| Type used for iterator offsets. | |
| using | iterator = const_sparse_iterator |
| Iterator type. | |
Public Member Functions | |
| const_sparse_iterator (const sparse_id *pDense, const page_type *pPages) | |
| Constructs a constant iterator for a dense position and sparse-page array. | |
| reference | operator* () const |
| Returns the value at the current position. | |
| pointer | operator-> () const |
| Returns a pointer to the value at the current position. | |
| iterator | operator[] (size_type offset) const |
| Returns an iterator at an offset from the current position. | |
| iterator & | operator+= (size_type diff) |
| Advances the iterator. | |
| iterator & | operator-= (size_type diff) |
| Moves the iterator backward. | |
| iterator & | operator++ () |
| Advances to the next value. | |
| iterator | operator++ (int) |
| Advances to the next value. | |
| iterator & | operator-- () |
| Moves to the previous value. | |
| iterator | operator-- (int) |
| Moves to the previous value. | |
| iterator | operator+ (size_type offset) const |
| Returns an iterator advanced by an offset. | |
| iterator | operator- (size_type offset) const |
| Returns an iterator moved backward by an offset. | |
| difference_type | operator- (const iterator &other) const |
| Returns the distance from another iterator. | |
| GAIA_NODISCARD bool | operator== (const iterator &other) const |
| Checks whether two iterators refer to the same position. | |
| GAIA_NODISCARD bool | operator!= (const iterator &other) const |
| Checks whether two iterators refer to different positions. | |
| GAIA_NODISCARD bool | operator> (const iterator &other) const |
| Checks whether this iterator follows another iterator. | |
| GAIA_NODISCARD bool | operator>= (const iterator &other) const |
| Checks whether this iterator does not precede another iterator. | |
| GAIA_NODISCARD bool | operator< (const iterator &other) const |
| Checks whether this iterator precedes another iterator. | |
| GAIA_NODISCARD bool | operator<= (const iterator &other) const |
| Checks whether this iterator does not follow another iterator. | |
Constant random-access iterator over sparse-storage values.
| T | Stored value type. |
| PageCapacity | Number of sparse entries represented by each page. |
| Allocator | Allocator used by the sparse pages. |
|
inline |
Constructs a constant iterator for a dense position and sparse-page array.
| pDense | Dense sparse-id position. |
| pPages | Sparse-page array containing the values. |
|
inline |
Checks whether two iterators refer to different positions.
| other | Iterator to compare. |
|
inline |
Returns the value at the current position.
|
inline |
Returns an iterator advanced by an offset.
| offset | Number of positions to advance. |
|
inline |
Advances to the next value.
|
inline |
Advances to the next value.
|
inline |
Advances the iterator.
| diff | Number of positions to advance. |
|
inline |
Returns the distance from another iterator.
| other | Iterator to subtract. |
|
inline |
Returns an iterator moved backward by an offset.
| offset | Number of positions to retreat. |
|
inline |
Moves to the previous value.
|
inline |
Moves to the previous value.
|
inline |
Moves the iterator backward.
| diff | Number of positions to retreat. |
|
inline |
Returns a pointer to the value at the current position.
|
inline |
Checks whether this iterator precedes another iterator.
| other | Iterator to compare. |
|
inline |
Checks whether this iterator does not follow another iterator.
| other | Iterator to compare. |
|
inline |
Checks whether two iterators refer to the same position.
| other | Iterator to compare. |
|
inline |
Checks whether this iterator follows another iterator.
| other | Iterator to compare. |
|
inline |
Checks whether this iterator does not precede another iterator.
| other | Iterator to compare. |
|
inline |
Returns an iterator at an offset from the current position.
| offset | Number of positions to advance. |