Owns the five link subtype side-tables plus the reverse index map.
More...
#include <LinkSubtypes.hpp>
|
| void | build_default_rows (const LinkData &L) |
| | Create a fresh default subtype row for every link, keyed by links.type[i], and rebuild the reverse index. Used by unit-test fixtures that hand-build a SimulationContext (set link types + write subtype config directly into these tables). Production never needs it — the parse/resolve/edit paths create rows as they go.
|
| |
| void | clear () noexcept |
| |
| void | rebuild_index (int n_links) |
| | Recompute subtype_row from each table's link_idx (no row data touched).
|
| |
| int | set_link_type (LinkData &links, int i, LinkType t) |
| |
| void | erase_link (int i, int n_after) |
| |
| int | conduit_row (int i) const noexcept |
| |
| int | pump_row (int i) const noexcept |
| |
| int | orifice_row (int i) const noexcept |
| |
| int | weir_row (int i) const noexcept |
| |
| int | outlet_row (int i) const noexcept |
| |
Owns the five link subtype side-tables plus the reverse index map.
subtype_row[i] is the row of link i within whichever side-table matches links.type[i] (every link type has exactly one). Together with each table's link_idx, this is O(1) in both directions.
◆ build_default_rows()
| void openswmm::LinkSubtypes::build_default_rows |
( |
const LinkData & | L | ) |
|
|
inline |
Create a fresh default subtype row for every link, keyed by links.type[i], and rebuild the reverse index. Used by unit-test fixtures that hand-build a SimulationContext (set link types + write subtype config directly into these tables). Production never needs it — the parse/resolve/edit paths create rows as they go.
◆ clear()
| void openswmm::LinkSubtypes::clear |
( |
| ) |
|
|
inlinenoexcept |
◆ conduit_row()
| int openswmm::LinkSubtypes::conduit_row |
( |
int | i | ) |
const |
|
inlinenoexcept |
◆ erase_link()
| void openswmm::LinkSubtypes::erase_link |
( |
int | i, |
|
|
int | n_after ) |
|
inline |
Drop link i's subtype row and renumber join keys after a base link erase. Call after LinkData::erase_at(i) (n_after = new link count).
◆ orifice_row()
| int openswmm::LinkSubtypes::orifice_row |
( |
int | i | ) |
const |
|
inlinenoexcept |
◆ outlet_row()
| int openswmm::LinkSubtypes::outlet_row |
( |
int | i | ) |
const |
|
inlinenoexcept |
◆ pump_row()
| int openswmm::LinkSubtypes::pump_row |
( |
int | i | ) |
const |
|
inlinenoexcept |
◆ rebuild_index()
| void openswmm::LinkSubtypes::rebuild_index |
( |
int | n_links | ) |
|
|
inline |
Recompute subtype_row from each table's link_idx (no row data touched).
◆ set_link_type()
| int openswmm::LinkSubtypes::set_link_type |
( |
LinkData & | links, |
|
|
int | i, |
|
|
LinkType | t ) |
|
inline |
Set link i to t, creating/removing/moving its subtype row. Returns the new subtype row. Also sets links.type[i]. Idempotent for the same type. Mirrors NodeSubtypes::set_node_type.
◆ weir_row()
| int openswmm::LinkSubtypes::weir_row |
( |
int | i | ) |
const |
|
inlinenoexcept |
◆ conduits
◆ orifices
◆ outlets
◆ pumps
◆ subtype_row
| std::vector<int> openswmm::LinkSubtypes::subtype_row |
base link index → row in its subtype table (-1 if unset).
◆ weirs
The documentation for this struct was generated from the following file:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/data/LinkSubtypes.hpp