|
| std::string | cellTrim (const std::string &s) |
| | Trim ASCII whitespace and one surrounding pair of double quotes. Mirrors the engine's cell_trim.
|
| |
| std::vector< std::string > | splitCells (const std::string &line, char delim) |
| | Quote-aware split on a single-character delimiter (engine cell_split).
|
| |
| bool | iequals (const std::string &a, const std::string &b) |
| | Case-insensitive equality (engine csv_iequals).
|
| |
| void | normalizeLine (std::string &line, bool firstLine) |
| | Strip a UTF-8 BOM (first line only) and a trailing '\r'.
|
| |
| bool | isBlankOrComment (const std::string &line) |
| | True for empty/all-whitespace lines and ';'/'#' comment lines.
|
| |
| bool | isTsfHeader (const std::string &line) |
| | True when the (normalized) line starts a PCSWMM .tsf header — case-insensitive "IDs:" prefix, per the engine's format sniff.
|
| |
| char | sniffDelimiter (const std::string &headerLine) |
| | Sniff the cell delimiter from the header row. The engine rule is "tab when tabs > 0 and tabs >= commas, else comma"; the GUI additionally recognizes semicolon-delimited files (io::guessDelimiter), so that extension is preserved here — the two agree on every engine-loadable file.
|
| |
| int | trailingMeridiem (const std::string &cell) |
| | 0 = none, 1 = AM, 2 = PM — from the cell's trailing token (engine trailing_meridiem).
|
| |
| bool | parseSeriesDateTime (const std::string &cell, DateTimeParts &out) |
| | Parse a series timestamp cell into calendar components.
|
| |
| void | splitPathColumn (const std::string &token, std::string &pathOut, std::string &columnOut) |
| | Split a "path[:column]" token into its parts.
|
| |
| std::string | composePathColumn (const std::string &path, const std::string &column) |
| | Compose the "path:column" token (empty column → bare path). The GUI always builds this token itself — the user never types the colon.
|
| |
| int | findColumn (const std::vector< std::string > &valueHeaders, const std::string &name) |
| | Resolve a column selector against a value-column name list (0-based, time column excluded). Case-insensitive, mirroring the engine's find_column. Returns -1 when name matches nothing.
|
| |
| std::string | fabricatedColumnName (std::size_t oneBasedIndex) |
| | Display name the GUI shows for value column oneBasedIndex of a headerless file. Single definition of the convention.
|
| |
| char openswmmvis::ui::extcol::sniffDelimiter |
( |
const std::string & |
headerLine | ) |
|
|
inline |
Sniff the cell delimiter from the header row. The engine rule is "tab when tabs > 0 and tabs >= commas, else comma"; the GUI additionally recognizes semicolon-delimited files (io::guessDelimiter), so that extension is preserved here — the two agree on every engine-loadable file.
Delimiters inside a quoted cell are NOT counted (review B-8): a tab-delimited header like Date<TAB>"a,b,c" used to sniff as comma and then mis-split every row. Quote handling now matches splitCells().