![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Bidirectional cursor tracking the last accessed index in a Table. More...
#include <TableData.hpp>
Public Member Functions | |
| void | reset () noexcept |
| Restore the lookup hint to row zero and forward direction. | |
Public Attributes | |
| int | index = 0 |
| Index of the last successful lookup entry. | |
| int | direction = +1 |
| Last seek direction: +1 = forward, -1 = backward. | |
Bidirectional cursor tracking the last accessed index in a Table.
The cursor maintains a hint about where the previous lookup landed. The next lookup starts from the cursor position and scans in the direction determined by comparing the query to x[cursor.index].
This is a value type — copies are cheap and independent.
|
inlinenoexcept |
Restore the lookup hint to row zero and forward direction.
Does not change table data or seek/reset a file stream; each cursor copy remains independent.
| int openswmm::TableCursor::direction = +1 |
Last seek direction: +1 = forward, -1 = backward.
| int openswmm::TableCursor::index = 0 |
Index of the last successful lookup entry.