![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Shared parsing utilities for input section handlers. More...
#include <string_view>#include <string>#include <charconv>#include "../core/charconv_compat.hpp"#include "../core/DateTime.hpp"Go to the source code of this file.
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::input |
Functions | |
| double | openswmm::input::to_double (std::string_view sv, double def=0.0) noexcept |
| Parse a double from a string_view, returning a default on failure. | |
| int | openswmm::input::to_int (std::string_view sv, int def=0) noexcept |
| Parse an int from a string_view, returning a default on failure. | |
| double | openswmm::input::parse_date (std::string_view sv) |
| Parse a date string in MM/DD/YYYY format to a DateTime (decimal days). | |
| double | openswmm::input::parse_time_seconds (std::string_view sv) |
| Parse a time string to seconds. | |
| double | openswmm::input::parse_time_day_fraction (std::string_view sv) |
| Parse a time string HH:MM:SS to a fractional day (DateTime). | |
| double | openswmm::input::parse_datetime (std::string_view date_sv, std::string_view time_sv) |
| Parse a combined date + time pair to a DateTime. | |
Shared parsing utilities for input section handlers.
Consolidates duplicated helper functions (to_double, to_int, parse_date, parse_time) that were previously defined as static functions in each handler .cpp file.