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

Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin. Reads use a shared mutable FILE cursor even on const methods: serialize all operations per reader, including refresh/close. Returns raw stored units; no endian/float-representation conversion or general corrupt-file hardening is provided. File counts/offsets must fit native allocation/long arithmetic. More...

#include <OutputReader.hpp>

Collaboration diagram for openswmm::OutputReader:

Public Member Functions

 OutputReader ()=default
 Construct an unopened reader with zero metadata and empty identifier arrays.
 
 ~OutputReader ()
 Close the file and destroy all reader-owned ID and code buffers.
 
 OutputReader (const OutputReader &)=delete
 Disable copying of the owned FILE cursor and buffers.
 
OutputReader & operator= (const OutputReader &)=delete
 Disable assignment of the owned FILE cursor and buffers.
 
bool open (const char *path)
 Open and parse the header/footer of a binary output file.
 
bool openLive (const char *path)
 Open a file that is still being written (no footer yet).
 
int refresh ()
 Re-count periods on a live file.
 
bool is_live () const noexcept
 True while opened via openLive() and the footer has not yet been seen.
 
void close ()
 Close the file and release resources.
 
bool is_open () const noexcept
 Whether the reader has a file open and valid.
 
int version () const noexcept
 Read retained parsed metadata without performing IO.
 
int flow_units () const noexcept
 Read retained parsed metadata without performing IO.
 
int subcatch_count () const noexcept
 Read retained parsed metadata without performing IO.
 
int node_count () const noexcept
 Read retained parsed metadata without performing IO.
 
int link_count () const noexcept
 Read retained parsed metadata without performing IO.
 
int pollut_count () const noexcept
 Read retained parsed metadata without performing IO.
 
int period_count () const noexcept
 Read retained parsed metadata without performing IO.
 
double start_date () const noexcept
 Read retained parsed metadata without performing IO.
 
int report_step () const noexcept
 Read retained parsed metadata without performing IO.
 
int error_code () const noexcept
 Read retained parsed metadata without performing IO.
 
bool has_subcatch_variable (int code) const
 Test presence of a stored subcatchment variable code.
 
int subcatch_var_count () const noexcept
 Read retained parsed metadata without performing IO.
 
int node_var_count () const noexcept
 Read retained parsed metadata without performing IO.
 
int link_var_count () const noexcept
 Read retained parsed metadata without performing IO.
 
int system_var_count () const noexcept
 Read retained parsed metadata without performing IO.
 
const char * subcatch_id (int index) const
 Borrow one subcatch identifier stored by the file.
 
const char * node_id (int index) const
 Borrow one node identifier stored by the file.
 
const char * link_id (int index) const
 Borrow one link identifier stored by the file.
 
const char * pollut_id (int index) const
 Species (pollutant) ID at a column index, or nullptr.
 
int pollut_units (int index) const
 Read a stored pollutant concentration-unit code.
 
bool get_subcatch_result (int period, int var, float *values) const
 Read one subcatch variable at one report period.
 
bool get_node_result (int period, int var, float *values) const
 Read one node variable for all nodes at a period.
 
bool get_link_result (int period, int var, float *values) const
 Read one link variable for all links at a period.
 
bool get_system_result (int period, int var, float *value) const
 Read one system variable at a period.
 
bool get_node_block (int period, std::vector< float > &values) const
 Read all node/link variables at one period with one contiguous read. Values are object-major: values[object * var_count + variable]. Storage is reused across calls; no history or live-file data is cached.
 
bool get_link_block (int period, std::vector< float > &values) const
 Read the contiguous object-major link result block.
 
bool get_subcatch_series (int obj_idx, int var, int start_period, int end_period, float *values) const
 Read an inclusive report-period series for one subcatch variable.
 
bool get_node_series (int obj_idx, int var, int start_period, int end_period, float *values) const
 Read an inclusive report-period series for one node variable.
 
bool get_link_series (int obj_idx, int var, int start_period, int end_period, float *values) const
 Read an inclusive report-period series for one link variable.
 
bool get_system_series (int var, int start_period, int end_period, float *values) const
 Read an inclusive report-period series for one system variable.
 
bool get_subcatch_attribute (int obj_idx, int period, float *values, int *count) const
 All variables for one subcatchment at one period.
 
bool get_node_attribute (int obj_idx, int period, float *values, int *count) const
 All variables for one node at one period.
 
bool get_link_attribute (int obj_idx, int period, float *values, int *count) const
 All variables for one link at one period.
 
bool get_period_time (int period, double *time) const
 Get the simulation time for a given period.
 
bool get_node_stat_max_depth (int node_idx, double *value) const
 Compute a node summary from its complete stored report-period series.
 
bool get_node_stat_max_overflow (int node_idx, double *value) const
 Compute a node summary from its complete stored report-period series.
 
bool get_node_stat_vol_flooded (int node_idx, double *value) const
 Compute a node summary from its complete stored report-period series.
 
bool get_node_stat_time_flooded (int node_idx, double *value) const
 Compute a node summary from its complete stored report-period series.
 

Detailed Description

Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin. Reads use a shared mutable FILE cursor even on const methods: serialize all operations per reader, including refresh/close. Returns raw stored units; no endian/float-representation conversion or general corrupt-file hardening is provided. File counts/offsets must fit native allocation/long arithmetic.

Constructor & Destructor Documentation

◆ OutputReader() [1/2]

openswmm::OutputReader::OutputReader ( )
default

Construct an unopened reader with zero metadata and empty identifier arrays.

Here is the caller graph for this function:

◆ ~OutputReader()

openswmm::OutputReader::~OutputReader ( )

Close the file and destroy all reader-owned ID and code buffers.

Here is the call graph for this function:

◆ OutputReader() [2/2]

openswmm::OutputReader::OutputReader ( const OutputReader & )
delete

Disable copying of the owned FILE cursor and buffers.

Here is the call graph for this function:

Member Function Documentation

◆ close()

void openswmm::OutputReader::close ( )

Close the file and release resources.

Safe repeatedly. Clears file/ID buffers and resets period count/live flag; other scalar counts/metadata and subcatch code storage can remain stale. Borrowed ID pointers become invalid. Never call concurrently with a read.

Here is the caller graph for this function:

◆ error_code()

int openswmm::OutputReader::error_code ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Simulation error recorded by the footer; zero while initially live. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.
Here is the caller graph for this function:

◆ flow_units()

int openswmm::OutputReader::flow_units ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Raw SWMM flow-unit enum from the last parsed header; no unit conversion. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.
Here is the caller graph for this function:

◆ get_link_attribute()

bool openswmm::OutputReader::get_link_attribute ( int obj_idx,
int period,
float * values,
int * count ) const

All variables for one link at one period.

Read one link object's stored result columns for a report period.

Parameters
obj_idxZero-based in-range object index.
periodZero-based in-range period.
[out]valuesRequired array of at least link_var_count() floats.
[out]countOptional number-written destination, set to link_var_count() only on success.
Returns
True after all reads, false for closed/null/range/seek/read failure; values can contain a partial prefix on failure while count remains unchanged.

◆ get_link_block()

bool openswmm::OutputReader::get_link_block ( int period,
std::vector< float > & values ) const

Read the contiguous object-major link result block.

Parameters
periodZero-based in-range report period.
[out]valuesResized to link_count()*link_var_count(); allocation errors propagate. A zero-object block succeeds with an empty destination.
Returns
True on complete read; false for invalid layout/range/IO, potentially after resize/partial overwrite. Stored units/order are unchanged.
Here is the caller graph for this function:

◆ get_link_result()

bool openswmm::OutputReader::get_link_result ( int period,
int var,
float * values ) const

Read one link variable for all links at a period.

Read one link variable at one report period.

Parameters
periodZero-based period index.
varZero-based physical variable-column ordinal in the stored block.
[out]valuesRequired writable array of at least link_count() floats, in object order.
Returns
True after all reads, false for closed/null/range/seek/read failure. Stored output units are returned unchanged; failed reads can leave a written prefix. All operations on this reader's shared FILE cursor must be externally serialized.

◆ get_link_series()

bool openswmm::OutputReader::get_link_series ( int obj_idx,
int var,
int start_period,
int end_period,
float * values ) const

Read an inclusive report-period series for one link variable.

Parameters
obj_idxZero-based in-range object index.
varZero-based physical variable-column ordinal in the stored block.
start_periodInclusive first period, at least zero.
end_periodInclusive final period, >=start_period and <period_count().
[out]valuesRequired array of at least end_period-start_period+1 floats; first output corresponds to start_period.
Returns
True on complete read, false for closed/null/range/seek/read failure; a read failure can leave a written prefix. Raw stored units and values are retained.

◆ get_node_attribute()

bool openswmm::OutputReader::get_node_attribute ( int obj_idx,
int period,
float * values,
int * count ) const

All variables for one node at one period.

Read one node object's stored result columns for a report period.

Parameters
obj_idxZero-based in-range object index.
periodZero-based in-range period.
[out]valuesRequired array of at least node_var_count() floats.
[out]countOptional number-written destination, set to node_var_count() only on success.
Returns
True after all reads, false for closed/null/range/seek/read failure; values can contain a partial prefix on failure while count remains unchanged.

◆ get_node_block()

bool openswmm::OutputReader::get_node_block ( int period,
std::vector< float > & values ) const

Read all node/link variables at one period with one contiguous read. Values are object-major: values[object * var_count + variable]. Storage is reused across calls; no history or live-file data is cached.

Read the contiguous object-major node result block.

Parameters
periodZero-based in-range report period.
[out]valuesResized to node_count()*node_var_count(); allocation errors propagate. A zero-object block succeeds with an empty destination.
Returns
True on complete read; false for invalid layout/range/IO, potentially after resize/partial overwrite. Stored units/order are unchanged.
Here is the caller graph for this function:

◆ get_node_result()

bool openswmm::OutputReader::get_node_result ( int period,
int var,
float * values ) const

Read one node variable for all nodes at a period.

Read one node variable at one report period.

Parameters
periodZero-based period index.
varZero-based physical variable-column ordinal in the stored block.
[out]valuesRequired writable array of at least node_count() floats, in object order.
Returns
True after all reads, false for closed/null/range/seek/read failure. Stored output units are returned unchanged; failed reads can leave a written prefix. All operations on this reader's shared FILE cursor must be externally serialized.

◆ get_node_series()

bool openswmm::OutputReader::get_node_series ( int obj_idx,
int var,
int start_period,
int end_period,
float * values ) const

Read an inclusive report-period series for one node variable.

Parameters
obj_idxZero-based in-range object index.
varZero-based physical variable-column ordinal in the stored block.
start_periodInclusive first period, at least zero.
end_periodInclusive final period, >=start_period and <period_count().
[out]valuesRequired array of at least end_period-start_period+1 floats; first output corresponds to start_period.
Returns
True on complete read, false for closed/null/range/seek/read failure; a read failure can leave a written prefix. Raw stored units and values are retained.
Here is the caller graph for this function:

◆ get_node_stat_max_depth()

bool openswmm::OutputReader::get_node_stat_max_depth ( int node_idx,
double * value ) const

Compute a node summary from its complete stored report-period series.

Parameters
node_idxZero-based in-range node.
[out]valueRequired destination. Maximum stored report-period depth in the file's length unit.
Returns
True on success (zero for no periods), false for closed/null/index/read failure. Destination changes only after the series was read. Allocation errors propagate. Report-step sampling can differ from routing-step engine statistics; no resampling or time interpolation is performed.
Here is the call graph for this function:

◆ get_node_stat_max_overflow()

bool openswmm::OutputReader::get_node_stat_max_overflow ( int node_idx,
double * value ) const

Compute a node summary from its complete stored report-period series.

Parameters
node_idxZero-based in-range node.
[out]valueRequired destination. Maximum stored report-period overflow in the file's flow unit.
Returns
True on success (zero for no periods), false for closed/null/index/read failure. Destination changes only after the series was read. Allocation errors propagate. Report-step sampling can differ from routing-step engine statistics; no resampling or time interpolation is performed.
Here is the call graph for this function:

◆ get_node_stat_time_flooded()

bool openswmm::OutputReader::get_node_stat_time_flooded ( int node_idx,
double * value ) const

Compute a node summary from its complete stored report-period series.

Parameters
node_idxZero-based in-range node.
[out]valueRequired destination. Number of positive-overflow periods times report_step, in seconds.
Returns
True on success (zero for no periods), false for closed/null/index/read failure. Destination changes only after the series was read. Allocation errors propagate. Report-step sampling can differ from routing-step engine statistics; no resampling or time interpolation is performed.
Here is the call graph for this function:

◆ get_node_stat_vol_flooded()

bool openswmm::OutputReader::get_node_stat_vol_flooded ( int node_idx,
double * value ) const

Compute a node summary from its complete stored report-period series.

Parameters
node_idxZero-based in-range node.
[out]valueRequired destination. Sum of positive report-period overflow times report_step seconds, in raw file-flow-unit times seconds (for example L for LPS, ft3 for CFS; GPM remains gallons/minute times seconds, without minute conversion).
Returns
True on success (zero for no periods), false for closed/null/index/read failure. Destination changes only after the series was read. Allocation errors propagate. Report-step sampling can differ from routing-step engine statistics; no resampling or time interpolation is performed.
Here is the call graph for this function:

◆ get_period_time()

bool openswmm::OutputReader::get_period_time ( int period,
double * time ) const

Get the simulation time for a given period.

Parameters
periodZero-based index in [0,period_count()).
[out]timeRequired writable double receiving the raw SWMM serial day value (day zero 1899-12-30). No timezone conversion is applied.
Returns
True after a complete read, false for closed/null/range/seek/read failure. A failed low-level fread can leave a partially changed destination.
Here is the caller graph for this function:

◆ get_subcatch_attribute()

bool openswmm::OutputReader::get_subcatch_attribute ( int obj_idx,
int period,
float * values,
int * count ) const

All variables for one subcatchment at one period.

Read one subcatch object's stored result columns for a report period.

Parameters
obj_idxZero-based in-range object index.
periodZero-based in-range period.
[out]valuesRequired array of at least min(subcatch_var_count(),8+pollut_count()) floats.
[out]countOptional number-written destination, set to min(subcatch_var_count(),8+pollut_count()) only on success.
Returns
True after all reads, false for closed/null/range/seek/read failure; values can contain a partial prefix on failure while count remains unchanged. Optional process columns beyond the legacy 8+pollutant prefix require code-based APIs.

◆ get_subcatch_result()

bool openswmm::OutputReader::get_subcatch_result ( int period,
int var,
float * values ) const

Read one subcatch variable at one report period.

Parameters
periodZero-based period index.
varSemantic subcatch code resolved through the file code list, not a column ordinal.
[out]valuesRequired writable array of at least subcatch_count() floats, in object order.
Returns
True after all reads, false for closed/null/range/seek/read failure. Stored output units are returned unchanged; failed reads can leave a written prefix. All operations on this reader's shared FILE cursor must be externally serialized.

◆ get_subcatch_series()

bool openswmm::OutputReader::get_subcatch_series ( int obj_idx,
int var,
int start_period,
int end_period,
float * values ) const

Read an inclusive report-period series for one subcatch variable.

Parameters
obj_idxZero-based in-range object index.
varSemantic subcatch code resolved through the file code list, not a column ordinal.
start_periodInclusive first period, at least zero.
end_periodInclusive final period, >=start_period and <period_count().
[out]valuesRequired array of at least end_period-start_period+1 floats; first output corresponds to start_period.
Returns
True on complete read, false for closed/null/range/seek/read failure; a read failure can leave a written prefix. Raw stored units and values are retained.

◆ get_system_result()

bool openswmm::OutputReader::get_system_result ( int period,
int var,
float * value ) const

Read one system variable at a period.

Read one system variable at one report period.

Parameters
periodZero-based period index.
varZero-based physical variable-column ordinal in the stored block.
[out]valueRequired writable float.
Returns
True after all reads, false for closed/null/range/seek/read failure. Stored output units are returned unchanged; failed reads can leave a written prefix. All operations on this reader's shared FILE cursor must be externally serialized.

◆ get_system_series()

bool openswmm::OutputReader::get_system_series ( int var,
int start_period,
int end_period,
float * values ) const

Read an inclusive report-period series for one system variable.

Parameters
varZero-based physical variable-column ordinal in the stored block.
start_periodInclusive first period, at least zero.
end_periodInclusive final period, >=start_period and <period_count().
[out]valuesRequired array of at least end_period-start_period+1 floats; first output corresponds to start_period.
Returns
True on complete read, false for closed/null/range/seek/read failure; a read failure can leave a written prefix. Raw stored units and values are retained.

◆ has_subcatch_variable()

bool openswmm::OutputReader::has_subcatch_variable ( int code) const
inline

Test presence of a stored subcatchment variable code.

Parameters
codeNonnegative code, not a physical column ordinal.
Returns
True when the code appears in the retained code list; does not require an open file, so the answer can reflect the last parsed file after close().

◆ is_live()

bool openswmm::OutputReader::is_live ( ) const
inlinenoexcept

True while opened via openLive() and the footer has not yet been seen.

Returns
Stored live-mode flag; false initially, after close or once refresh accepts a footer.

◆ is_open()

bool openswmm::OutputReader::is_open ( ) const
inlinenoexcept

Whether the reader has a file open and valid.

Returns
True exactly when file_ is nonnull. Does not revalidate external file contents.
Here is the caller graph for this function:

◆ link_count()

int openswmm::OutputReader::link_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Link count from the last parsed header. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.
Here is the caller graph for this function:

◆ link_id()

const char * openswmm::OutputReader::link_id ( int index) const

Borrow one link identifier stored by the file.

Parameters
indexZero-based link index. Requires a successfully open reader; close() clears names while retaining object counts.
Returns
Reader-owned NUL-terminated bytes, or null for a rejected index. Never free; lifetime ends at close(), reopen or destruction.
Here is the caller graph for this function:

◆ link_var_count()

int openswmm::OutputReader::link_var_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Stored link-column count, including pollutant/species columns. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.
Here is the caller graph for this function:

◆ node_count()

int openswmm::OutputReader::node_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Node count from the last parsed header. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.
Here is the caller graph for this function:

◆ node_id()

const char * openswmm::OutputReader::node_id ( int index) const

Borrow one node identifier stored by the file.

Parameters
indexZero-based node index. Requires a successfully open reader; close() clears names while retaining object counts.
Returns
Reader-owned NUL-terminated bytes, or null for a rejected index. Never free; lifetime ends at close(), reopen or destruction.
Here is the caller graph for this function:

◆ node_var_count()

int openswmm::OutputReader::node_var_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Stored node-column count, including pollutant/species columns. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.
Here is the caller graph for this function:

◆ open()

bool openswmm::OutputReader::open ( const char * path)

Open and parse the header/footer of a binary output file.

Returns
true on success, false on error (bad magic, I/O failure, etc.).
Parameters
pathNUL-terminated UTF-8 filename, read-only. Null returns false while preserving an existing open reader; a nonnull path closes it before attempting the new file. Requires the expected SWMM binary layout and complete footer. Failure closes any newly opened file but retains some parsed scalar metadata; allocation exceptions propagate. A footer simulation error code does not itself make open fail. Caller serializes file access and checks is_open() before ID reads.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openLive()

bool openswmm::OutputReader::openLive ( const char * path)

Open a file that is still being written (no footer yet).

Every offset the footer would supply is derived by parsing the header forward, and the period count is derived from the file size: floor((size - output_start) / bytes_per_period), so a partially flushed last record is never counted. Call refresh() to pick up periods appended since. Works on any file with a complete header — including one from a run that died before writing its footer. Never writes to the file.

Returns
true on success (possibly with zero periods yet).
Parameters
pathNUL-terminated UTF-8 filename with a complete expected header/input/ variable section. Null preserves an existing reader; nonnull closes it first. Initial refresh errors can leave the count zero while openLive still succeeds. This method neither waits for a header nor writes/locks the growing source file. Caller coordinates writer visibility and serializes this reader's cursor access.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

OutputReader & openswmm::OutputReader::operator= ( const OutputReader & )
delete

Disable assignment of the owned FILE cursor and buffers.

Here is the call graph for this function:

◆ period_count()

int openswmm::OutputReader::period_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Current retained period count; refresh() updates live files and close() resets it. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.
Here is the caller graph for this function:

◆ pollut_count()

int openswmm::OutputReader::pollut_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Pollutant/species-column count from the last parsed header. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.

◆ pollut_id()

const char * openswmm::OutputReader::pollut_id ( int index) const

Species (pollutant) ID at a column index, or nullptr.

The writer has always emitted a fourth ID list after the link IDs — the species names, one per pollutant column — but the reader stopped after three and no public entry point exposed them. Water age reports as a trailing __WATER_AGE__ column whose unit field necessarily reuses a concentration code (the .out unit enum has no HOURS slot), so the NAME is the only way a consumer can tell hours from mg/L. That made this reader a prerequisite for water age being usable at all, not a convenience.

Borrow one pollut identifier stored by the file.

Parameters
indexZero-based pollut index. Bounds use the actual stored name array.
Returns
Reader-owned NUL-terminated bytes, or null for a rejected index. Never free; lifetime ends at close(), reopen or destruction.

◆ pollut_units()

int openswmm::OutputReader::pollut_units ( int index) const

Read a stored pollutant concentration-unit code.

Parameters
indexZero-based pollutant column.
Returns
Raw file code, or -1 outside the stored unit array. A water-age sentinel name still denotes hours even though its unit slot reuses a concentration enum.

◆ refresh()

int openswmm::OutputReader::refresh ( )

Re-count periods on a live file.

Re-reads the file size and updates period_count(). When the footer has appeared (the run finished) it is adopted — period count and error code become the writer's own — and the reader leaves live mode; subsequent calls are no-ops. On a reader opened with open() this returns period_count() unchanged.

Returns
the current period count, or -1 if no file is open.
Current whole-record count, -1 with no open file. Seek/size failures on a live file retain the previous count rather than reporting -1. Truncation can reduce the count; no monotonic append check is enforced here. A structurally matching footer supplies authoritative count/error and ends live mode.
Here is the caller graph for this function:

◆ report_step()

int openswmm::OutputReader::report_step ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Stored report interval in seconds; not the routing timestep. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.

◆ start_date()

double openswmm::OutputReader::start_date ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Raw SWMM serial day (day zero 1899-12-30), including fractional days. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.

◆ subcatch_count()

int openswmm::OutputReader::subcatch_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Subcatchment count from the last parsed header. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.

◆ subcatch_id()

const char * openswmm::OutputReader::subcatch_id ( int index) const

Borrow one subcatch identifier stored by the file.

Parameters
indexZero-based subcatch index. Requires a successfully open reader; close() clears names while retaining object counts.
Returns
Reader-owned NUL-terminated bytes, or null for a rejected index. Never free; lifetime ends at close(), reopen or destruction.

◆ subcatch_var_count()

int openswmm::OutputReader::subcatch_var_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Stored physical subcatch column count, which can exceed the legacy attribute prefix. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.

◆ system_var_count()

int openswmm::OutputReader::system_var_count ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Stored system result-column count. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.

◆ version()

int openswmm::OutputReader::version ( ) const
inlinenoexcept

Read retained parsed metadata without performing IO.

Returns
Raw engine/version integer from the last parsed header. Except period_count(), these scalar values can remain stale after close(); inspect is_open() before treating them as current.

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