|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
#include <ringfilecache.H>
Public Member Functions | |
| size_t | get_pos () const noexcept |
| Logical offset from the head (number of elements already visited) | |
| bool | has_curr () const |
| True if the iterator currently refers to a valid element. | |
| Iterator (const RingFileCache< T > &cache, const size_t offset=0) | |
Construct an iterator positioned offset entries forward from the oldest cache entry. | |
| T | get_curr_ne () const noexcept |
| Return the current element (no bounds check). Undefined if exhausted. | |
| T | get_curr () const |
| Return the current element. | |
| void | next_ne () noexcept |
| Advance to the next element without checking bounds. Safe to call when exhausted. | |
| void | next () |
| Advance to the next element. | |
Private Member Functions | |
| void | set_curr_pointer () |
| void | increase_pos () |
| void | load_curr () |
Private Attributes | |
| RingFileCache< T > * | cache_ptr = nullptr |
| T | curr {} |
| size_t | pos = 0 |
| size_t | curr_pos = 0 |
Definition at line 967 of file ringfilecache.H.
|
inline |
Construct an iterator positioned offset entries forward from the oldest cache entry.
| [in] | cache | the cache on which to iterate |
| [in] | offset | how many positions from the oldest cache entry |
Definition at line 1005 of file ringfilecache.H.
References RingFileCache< T >::Iterator::cache_ptr, RingFileCache< T >::Iterator::load_curr(), Aleph::maps(), and RingFileCache< T >::Iterator::pos.
|
inline |
Return the current element.
| overflow_error | if the iterator is exhausted |
Definition at line 1026 of file ringfilecache.H.
References ah_overflow_error_if, RingFileCache< T >::Iterator::get_curr_ne(), RingFileCache< T >::Iterator::has_curr(), and Aleph::maps().
Referenced by RingFileCache< T >::read_from().
|
inlinenoexcept |
Return the current element (no bounds check). Undefined if exhausted.
Definition at line 1019 of file ringfilecache.H.
References RingFileCache< T >::Iterator::curr.
Referenced by RingFileCache< T >::Iterator::get_curr(), and RingFileCache< T >::read_from().
|
inlinenoexcept |
Logical offset from the head (number of elements already visited)
Definition at line 994 of file ringfilecache.H.
References RingFileCache< T >::Iterator::pos.
|
inline |
True if the iterator currently refers to a valid element.
Definition at line 997 of file ringfilecache.H.
References RingFileCache< T >::Iterator::cache_ptr, and RingFileCache< T >::Iterator::pos.
Referenced by RingFileCache< T >::Iterator::get_curr(), RingFileCache< T >::Iterator::next(), RingFileCache< T >::Iterator::next_ne(), RingFileCache< T >::read_from(), and RingFileCache< T >::read_from().
|
inlineprivate |
Definition at line 979 of file ringfilecache.H.
References RingFileCache< T >::Iterator::cache_ptr, RingFileCache< T >::Iterator::curr_pos, and RingFileCache< T >::Iterator::pos.
Referenced by RingFileCache< T >::Iterator::next_ne().
|
inlineprivate |
Definition at line 986 of file ringfilecache.H.
References RingFileCache< T >::Iterator::cache_ptr, RingFileCache< T >::Iterator::curr, and RingFileCache< T >::Iterator::set_curr_pointer().
Referenced by RingFileCache< T >::Iterator::Iterator(), and RingFileCache< T >::Iterator::next_ne().
|
inline |
Advance to the next element.
| overflow_error | if the iterator is already exhausted |
Definition at line 1045 of file ringfilecache.H.
References ah_overflow_error_if, RingFileCache< T >::Iterator::has_curr(), Aleph::maps(), and RingFileCache< T >::Iterator::next_ne().
|
inlinenoexcept |
Advance to the next element without checking bounds. Safe to call when exhausted.
Definition at line 1034 of file ringfilecache.H.
References RingFileCache< T >::Iterator::has_curr(), RingFileCache< T >::Iterator::increase_pos(), and RingFileCache< T >::Iterator::load_curr().
Referenced by RingFileCache< T >::Iterator::next(), RingFileCache< T >::read_from(), and RingFileCache< T >::read_from().
|
inlineprivate |
Definition at line 974 of file ringfilecache.H.
References RingFileCache< T >::Iterator::cache_ptr, and RingFileCache< T >::Iterator::curr_pos.
Referenced by RingFileCache< T >::Iterator::load_curr().
|
private |
|
private |
Definition at line 970 of file ringfilecache.H.
Referenced by RingFileCache< T >::Iterator::get_curr_ne(), and RingFileCache< T >::Iterator::load_curr().
|
private |
Definition at line 972 of file ringfilecache.H.
Referenced by RingFileCache< T >::Iterator::increase_pos(), and RingFileCache< T >::Iterator::set_curr_pointer().
|
private |
Definition at line 971 of file ringfilecache.H.
Referenced by RingFileCache< T >::Iterator::Iterator(), RingFileCache< T >::Iterator::get_pos(), RingFileCache< T >::Iterator::has_curr(), and RingFileCache< T >::Iterator::increase_pos().