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

#include <TableData.hpp>

Collaboration diagram for openswmm::Table:

Public Member Functions

std::size_t size () const noexcept
 Number of data points.
 
bool empty () const noexcept
 True if the table has at least one data point.
 

Public Attributes

std::string id
 Table identifier (from input file)
 
TableType type
 Table type (TIMESERIES, CURVE_*, etc.)
 
std::string comment
 Object comment from the INP file (';'-prefixed lines immediately above the first row of this table), joined by literal "\\n". Empty string means no comment.
 
std::vector< double > x
 Independent variable (time, depth, etc.)
 
std::vector< double > y
 Dependent variable (flow, volume, etc.)
 
TableCursor cursor
 Bidirectional lookup cursor.
 
bool is_file_based = false
 True if data is read from external file.
 
std::FILE * file_handle = nullptr
 Open file handle (owned)
 
std::string file_path
 Path to external data file.
 
TableBlock first_boundary
 First rows from file (for validation)
 
TableBlock last_boundary
 Last rows from file (for validation)
 
TableBlock cache
 Sliding cache window for file lookups.
 
double dx_min = 0.0
 Minimum inter-entry x spacing.
 
double x_min = 0.0
 Minimum x value in file.
 
double x_max = 0.0
 Maximum x value in file.
 
int num_cols = 1
 Number of value columns.
 
std::size_t total_rows = 0
 Total data rows in file.
 
std::size_t num_cache_rows = 8192
 Cache window size (rows)
 
long data_start_offset = 0
 File offset to first data row.
 
std::vector< long > row_offsets
 Sparse byte-offset index into file.
 
std::vector< std::string > column_ids
 Column identifiers.
 
std::unordered_map< std::string, int > column_map
 Column name → index.
 

Static Public Attributes

static constexpr std::size_t INDEX_STRIDE = 4096
 Rows between offset index entries.
 

Member Function Documentation

◆ empty()

bool openswmm::Table::empty ( ) const
inlinenoexcept

True if the table has at least one data point.

Here is the caller graph for this function:

◆ size()

std::size_t openswmm::Table::size ( ) const
inlinenoexcept

Number of data points.

Member Data Documentation

◆ cache

TableBlock openswmm::Table::cache

Sliding cache window for file lookups.

◆ column_ids

std::vector<std::string> openswmm::Table::column_ids

Column identifiers.

◆ column_map

std::unordered_map<std::string, int> openswmm::Table::column_map

Column name → index.

◆ comment

std::string openswmm::Table::comment

Object comment from the INP file (';'-prefixed lines immediately above the first row of this table), joined by literal "\\n". Empty string means no comment.

◆ cursor

TableCursor openswmm::Table::cursor

Bidirectional lookup cursor.

◆ data_start_offset

long openswmm::Table::data_start_offset = 0

File offset to first data row.

◆ dx_min

double openswmm::Table::dx_min = 0.0

Minimum inter-entry x spacing.

◆ file_handle

std::FILE* openswmm::Table::file_handle = nullptr

Open file handle (owned)

◆ file_path

std::string openswmm::Table::file_path

Path to external data file.

◆ first_boundary

TableBlock openswmm::Table::first_boundary

First rows from file (for validation)

◆ id

std::string openswmm::Table::id

Table identifier (from input file)

◆ INDEX_STRIDE

constexpr std::size_t openswmm::Table::INDEX_STRIDE = 4096
staticconstexpr

Rows between offset index entries.

◆ is_file_based

bool openswmm::Table::is_file_based = false

True if data is read from external file.

◆ last_boundary

TableBlock openswmm::Table::last_boundary

Last rows from file (for validation)

◆ num_cache_rows

std::size_t openswmm::Table::num_cache_rows = 8192

Cache window size (rows)

◆ num_cols

int openswmm::Table::num_cols = 1

Number of value columns.

◆ row_offsets

std::vector<long> openswmm::Table::row_offsets

Sparse byte-offset index into file.

◆ total_rows

std::size_t openswmm::Table::total_rows = 0

Total data rows in file.

◆ type

TableType openswmm::Table::type

Table type (TIMESERIES, CURVE_*, etc.)

◆ x

std::vector<double> openswmm::Table::x

Independent variable (time, depth, etc.)

◆ x_max

double openswmm::Table::x_max = 0.0

Maximum x value in file.

◆ x_min

double openswmm::Table::x_min = 0.0

Minimum x value in file.

◆ y

std::vector<double> openswmm::Table::y

Dependent variable (flow, volume, etc.)


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