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

#include <LinkSubtypes.hpp>

Collaboration diagram for openswmm::PumpData:

Public Member Functions

int count () const noexcept
 Count PumpData rows from the base-object join-key column.
 
void clear () noexcept
 Erase all PumpData rows while retaining vector capacities.
 
void reserve (int n)
 Request capacity for each PumpData column without changing row count.
 
int add_default (int i)
 Insert a default PumpData row at the sorted base-object key position.
 
void erase_at (int r)
 Erase dense PumpData row data and shift later dense rows down.
 

Public Attributes

std::vector< int > link_idx
 
std::vector< int > curve
 Pump curve table index (-1 = ideal)
 
std::vector< uint8_t > init_state
 Initial on/off (was vector<bool>)
 
std::vector< double > startup
 Startup depth.
 
std::vector< double > shutoff
 Shutoff depth.
 
std::vector< int > curve_type
 Pump curve type (1-5, 6=ideal; -1 unset)
 

Member Function Documentation

◆ add_default()

int openswmm::PumpData::add_default ( int i)
inline

Insert a default PumpData row at the sorted base-object key position.

Assumes ascending link_idx and aligned columns. Seeds curve/curve_type=-1, off initial state and zero switching depths. Does not update the enclosing reverse map, reject duplicate keys, enforce lifecycle or initialize solver caches. Allocation failure can leave partially inserted parallel columns.

Parameters
[in]iNonnegative base-object index; caller ensures it exists, is of this subtype and is absent from this table.
Returns
Inserted dense row index; later dense rows shift up.

◆ clear()

void openswmm::PumpData::clear ( )
inlinenoexcept

Erase all PumpData rows while retaining vector capacities.

Invalidates element references/iterators and removes owned nested state. Does not clear base objects or repair the enclosing reverse map.

◆ count()

int openswmm::PumpData::count ( ) const
inlinenoexcept

Count PumpData rows from the base-object join-key column.

Returns
link_idx.size() converted to int; other column lengths are not checked.

◆ erase_at()

void openswmm::PumpData::erase_at ( int r)
inline

Erase dense PumpData row data and shift later dense rows down.

Erases every defined side-table column. Does not erase a base object, renumber stored base keys or rebuild the reverse map; enclosing maintenance handles those steps.

Parameters
[in]rExisting dense subtype-row index, NOT the base-object index; caller validates bounds/alignment.

◆ reserve()

void openswmm::PumpData::reserve ( int n)
inline

Request capacity for each PumpData column without changing row count.

May invalidate column references/iterators. Allocation failure can leave different reserved capacities, while existing row values remain.

Parameters
[in]nNonnegative anticipated row count; caller validates before conversion to size_t.

Member Data Documentation

◆ curve

std::vector<int> openswmm::PumpData::curve

Pump curve table index (-1 = ideal)

◆ curve_type

std::vector<int> openswmm::PumpData::curve_type

Pump curve type (1-5, 6=ideal; -1 unset)

◆ init_state

std::vector<uint8_t> openswmm::PumpData::init_state

Initial on/off (was vector<bool>)

◆ link_idx

std::vector<int> openswmm::PumpData::link_idx

◆ shutoff

std::vector<double> openswmm::PumpData::shutoff

Shutoff depth.

◆ startup

std::vector<double> openswmm::PumpData::startup

Startup depth.


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