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

#include <SpeciesRegistry.hpp>

Collaboration diagram for openswmm::SpeciesRegistry:

Public Member Functions

void clear ()
 
int add (std::string name, SpeciesKind kind, std::string units)
 
int find (std::string_view name) const
 
int count () const noexcept
 
int pollutant_count () const noexcept
 
int transported_count () const noexcept
 
const std::string & name (int i) const
 
SpeciesKind kind (int i) const
 
const std::string & units (int i) const
 
void truncate_to (int n)
 

Member Function Documentation

◆ add()

int openswmm::SpeciesRegistry::add ( std::string name,
SpeciesKind kind,
std::string units )
inline

Append a species. Returns the new index, or -1 on a name collision (names are unique across ALL kinds — an MSX species may not shadow a pollutant).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void openswmm::SpeciesRegistry::clear ( )
inline

◆ count()

int openswmm::SpeciesRegistry::count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ find()

int openswmm::SpeciesRegistry::find ( std::string_view name) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kind()

SpeciesKind openswmm::SpeciesRegistry::kind ( int i) const
inline
Here is the caller graph for this function:

◆ name()

const std::string & openswmm::SpeciesRegistry::name ( int i) const
inline
Here is the caller graph for this function:

◆ pollutant_count()

int openswmm::SpeciesRegistry::pollutant_count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ transported_count()

int openswmm::SpeciesRegistry::transported_count ( ) const
inlinenoexcept

Species the ARD engine carries on its mesh: POLLUTANT + MSX_BULK (E4/R6) + RESERVED_AGE (A1a) + RESERVED_TEMPERATURE (H4). WALL species are element-local and stay off the mesh.

Note
This is a KIND whitelist, the shape lesson 51 warns about: it had to be edited when temperature joined, and will again for the next reserved kind. It currently has no callers in src/, so a stale entry here is latent rather than live — which is exactly why it was still wrong when H4 arrived.

◆ truncate_to()

void openswmm::SpeciesRegistry::truncate_to ( int n)
inline

Drop every entry at index >= n (E-C2: the MSX-block rebuild in the reactions CRUD API snapshots the tail, truncates, re-adds the MSX species from ReactionData, then restores the tail). Recounts pollutants defensively, though the pollutant block always precedes n.

Here is the call graph for this function:

◆ units()

const std::string & openswmm::SpeciesRegistry::units ( int i) const
inline
Here is the caller graph for this function:

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