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

One fully parsed multi-column series file (raw file-unit values). More...

#include <MultiColumnSeriesFile.hpp>

Collaboration diagram for openswmm::input::ParsedSeriesFile:

Public Member Functions

int find_column (std::string_view name) const
 Find the first non-time header matching with C-locale case folding.
 
int first_data_column () const
 Select the first data column based on header shape.
 

Public Attributes

std::vector< std::string > headers
 Header names; index 0 is the time-column label and never matches.
 
std::vector< double > dates
 Row datetimes (SWMM OADate, whole file, ascending).
 
std::vector< std::vector< double > > columns
 columns[i] (i >= 1) aligned to dates; columns[0] is unused/empty.
 
double first_date = 0.0
 Whole-file first/last datetime (0 when the file has no data rows).
 
double last_date = 0.0
 
std::vector< double > col_first_date
 
std::vector< double > col_last_date
 
std::vector< long > col_periods_precip
 cells with value > 0
 
std::vector< long > col_unparsed_cells
 value-parse failures
 
long unparsed_rows = 0
 Data rows whose datetime cell failed to parse (skipped entirely).
 

Detailed Description

One fully parsed multi-column series file (raw file-unit values).

Rows are sorted ascending by datetime. A cell that was missing (short row) or unparseable holds a quiet NaN in its column so all columns stay aligned to dates; consumers skip NaNs on copy-out.

Member Function Documentation

◆ find_column()

int openswmm::input::ParsedSeriesFile::find_column ( std::string_view name) const

Find the first non-time header matching with C-locale case folding.

Linear scan; caller prevents concurrent mutation of the owned parsed-file headers.

Parameters
[in]nameBorrowed exact-length header bytes; no whitespace/quote cleanup occurs here.
Returns
First matching index>=1, or -1 for no match/time-column-only match.

◆ first_data_column()

int openswmm::input::ParsedSeriesFile::first_data_column ( ) const
inline

Select the first data column based on header shape.

Does not require any parsed data rows or inspect column storage.

Returns
One if headers has at least two entries; -1 otherwise.

Member Data Documentation

◆ col_first_date

std::vector<double> openswmm::input::ParsedSeriesFile::col_first_date

◆ col_last_date

std::vector<double> openswmm::input::ParsedSeriesFile::col_last_date

◆ col_periods_precip

std::vector<long> openswmm::input::ParsedSeriesFile::col_periods_precip

cells with value > 0

◆ col_unparsed_cells

std::vector<long> openswmm::input::ParsedSeriesFile::col_unparsed_cells

value-parse failures

◆ columns

std::vector<std::vector<double> > openswmm::input::ParsedSeriesFile::columns

columns[i] (i >= 1) aligned to dates; columns[0] is unused/empty.

◆ dates

std::vector<double> openswmm::input::ParsedSeriesFile::dates

Row datetimes (SWMM OADate, whole file, ascending).

◆ first_date

double openswmm::input::ParsedSeriesFile::first_date = 0.0

Whole-file first/last datetime (0 when the file has no data rows).

◆ headers

std::vector<std::string> openswmm::input::ParsedSeriesFile::headers

Header names; index 0 is the time-column label and never matches.

◆ last_date

double openswmm::input::ParsedSeriesFile::last_date = 0.0

◆ unparsed_rows

long openswmm::input::ParsedSeriesFile::unparsed_rows = 0

Data rows whose datetime cell failed to parse (skipped entirely).


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