A minimal sequential-only cursor over the file data. Enforces the "forward-only" usage pattern in calling code.
| T | The data type to sequentially load from this cursor. |
Definition at line 23 of file mappedfile.hpp.
#include <mappedfile.hpp>
Public Method Index: | |
| Data () | |
| Defaulted default-constructor. | |
| Data (const void *pStart, size_t length) | |
| template<typename U> | |
| Data< U > | Clone () const noexcept |
| const T | Current () const noexcept |
| bool | IsEOF () const noexcept |
| template<typename TCheck = alib::CHK> | |
| T | Next () |
| template<typename TCheck = alib::CHK> | |
| T | operator() () |
| const T | operator* () const noexcept |
| integer | Remaining () const noexcept |
| template<typename TIntegral> | |
| void | Skip (TIntegral n) |
Protected Field Index: | |
| const T * | end |
| Pointer to the end of the data. | |
| const T * | start |
| Current pointer position. | |
|
protected |
Pointer to the end of the data.
Definition at line 26 of file mappedfile.hpp.
|
protected |
Current pointer position.
Definition at line 25 of file mappedfile.hpp.
|
inline |
Defaulted default-constructor.
Definition at line 30 of file mappedfile.hpp.
|
inline |
Constructor.
| pStart | Pointer to the start of the data. |
| length | The length of the data. |
Definition at line 35 of file mappedfile.hpp.
|
inlinenoexcept |
Clones this object to represent values of template type U.
| U | The type of the cloned data instance |
Definition at line 97 of file mappedfile.hpp.
|
inlinenoexcept |
Get a pointer to the current position (read-only).
Definition at line 80 of file mappedfile.hpp.
|
inlinenoexcept |
True if at end.
true if the current position reached end, false otherwise. Definition at line 53 of file mappedfile.hpp.
|
inline |
Get the next value and advance.
| TCheck | Defaults to alib::CHK, which is the normal invocation mode. If alib::NC is given, no range check is performed. In debug builds, an assertion is raised if the cursor is at end. |
Definition at line 61 of file mappedfile.hpp.
|
inline |
Shortcut to method Next.
| TCheck | Defaults to alib::CHK, which is the normal invocation mode. If alib::NC is given, no range check is performed. In debug builds, an assertion is raised if the cursor is at end. |
Definition at line 76 of file mappedfile.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Remaining value.
Definition at line 48 of file mappedfile.hpp.
|
inline |
Advance by n values (must stay within range).
| n | Number of values to advance. |
| TIntegral | The type of the parameter n. |
Definition at line 91 of file mappedfile.hpp.