OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::TableCursor Struct Reference

Bidirectional cursor tracking the last accessed index in a Table. More...

#include <TableData.hpp>

Collaboration diagram for openswmm::TableCursor:

Public Member Functions

void reset () noexcept
 

Public Attributes

int index = 0
 Index of the last successful lookup entry.
 
int direction = +1
 Last seek direction: +1 = forward, -1 = backward.
 

Detailed Description

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.

Member Function Documentation

◆ reset()

void openswmm::TableCursor::reset ( )
inlinenoexcept

Member Data Documentation

◆ direction

int openswmm::TableCursor::direction = +1

Last seek direction: +1 = forward, -1 = backward.

◆ index

int openswmm::TableCursor::index = 0

Index of the last successful lookup entry.


The documentation for this struct was generated from the following file: