![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Top-level SWMM .inp file reader. More...
#include "SectionRegistry.hpp"#include "../core/SimulationContext.hpp"#include <string>#include <vector>#include <iosfwd>Go to the source code of this file.
Classes | |
| class | openswmm::input::InputReader |
| Reads and parses a SWMM .inp file into a SimulationContext. More... | |
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::input |
Top-level SWMM .inp file reader.
InputReader performs a single-pass read of the .inp file:
[SECTIONNAME]).The SectionRegistry then calls the appropriate built-in or custom handler, which populates the SimulationContext.
The legacy SWMM uses two passes: one to count objects, one to read data. The new engine does a single pass using dynamic resize: objects are added to name indices as their section is parsed, and NodeData::resize() is called at the end of each section.
SWMM input files may list sections in any order. Cross-references (e.g., a junction referencing a rain gage) are resolved after all sections are parsed in a final resolution step.