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

Time-pattern authoring names, types and multiplier vectors. More...

#include <InflowData.hpp>

Collaboration diagram for openswmm::PatternData:

Public Member Functions

int count () const
 Count rows in the primary ordered column.
 
void add (const std::string &name, int type, const std::vector< double > &facs)
 Append a copied pattern row.
 
int find (std::string_view name) const noexcept
 Find the first ASCII-insensitive pattern name match.
 

Public Attributes

std::vector< std::string > names
 Pattern name.
 
std::vector< int > types
 0=MONTHLY,1=DAILY,2=HOURLY,3=WEEKEND
 
std::vector< std::vector< double > > factors
 Up to 24 multiplier values.
 

Detailed Description

Time-pattern authoring names, types and multiplier vectors.

Owns its strings and vectors; references/iterators into columns may be invalidated by append/erase. Mutating this container does not synchronize engine solver state.

Member Function Documentation

◆ add()

void openswmm::PatternData::add ( const std::string & name,
int type,
const std::vector< double > & facs )
inline

Append a copied pattern row.

Low-level authoring storage only: no lifecycle, name/reference, numeric or duplicate validation and no solver-cache rebuild. Caller keeps parallel columns aligned, serializes access and keeps row count representable as int. Allocation exceptions can leave a partially appended row; there is no rollback.

Parameters
[in]nameCopied pattern name; empty/duplicate names are accepted.
[in]typeCopied monthly/daily/hourly/weekend type code; no range check.
[in]facsCopied multiplier sequence; its length and numeric values are not checked.
Here is the caller graph for this function:

◆ count()

int openswmm::PatternData::count ( ) const
inline

Count rows in the primary ordered column.

Returns
Primary row count converted to int; no alignment verification of the other columns.
Here is the caller graph for this function:

◆ find()

int openswmm::PatternData::find ( std::string_view name) const
inlinenoexcept

Find the first ASCII-insensitive pattern name match.

Linear scan preserves first-entry precedence when duplicate equivalent names exist. Caller prevents concurrent table mutation.

Parameters
[in]nameBorrowed name bytes, including any embedded NUL; no allocation or normalization.
Returns
First matching zero-based row, or -1 when absent.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ factors

std::vector<std::vector<double> > openswmm::PatternData::factors

Up to 24 multiplier values.

◆ names

std::vector<std::string> openswmm::PatternData::names

Pattern name.

◆ types

std::vector<int> openswmm::PatternData::types

0=MONTHLY,1=DAILY,2=HOURLY,3=WEEKEND


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