OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches

Comprehensive .inp serialisation — round-trip identical output. More...

#include "InpWriter.hpp"
#include "SimulationContext.hpp"
#include <cstdio>
#include <cstring>
Include dependency graph for InpWriter.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::inp_writer
 

Functions

int openswmm::inp_writer::writeInpFile (const SimulationContext &ctx, const std::string &path)
 Write the full model to a SWMM .inp file.
 

Detailed Description

Comprehensive .inp serialisation — round-trip identical output.

Writes every SWMM input section with exact column layouts matching the legacy format so that read -> write -> read produces identical model state. Shape names, enum strings, and field widths are taken directly from legacy text.h and keywords.c.

All standard SWMM sections implemented: TITLE, OPTIONS, RAINGAGES, SUBCATCHMENTS, SUBAREAS, INFILTRATION, JUNCTIONS, OUTFALLS, DIVIDERS, STORAGE, CONDUITS, PUMPS, ORIFICES, WEIRS, OUTLETS, XSECTIONS, LOSSES, TRANSECTS, STREETS, INLETS, CONTROLS, POLLUTANTS, LANDUSES, BUILDUP, WASHOFF, TREATMENT, INFLOWS, DWF, RDII, PATTERNS, TIMESERIES, CURVES, COORDINATES, USER_FLAGS, USER_FLAG_VALUES, PLUGINS

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License