![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Slice IO-8 — hydrate SimulationContext external-file slots from the Part D GeoPackage tables and materialise scratch files in the legacy on-disk format so legacy fopen sites keep working.
More...
#include <string>Go to the source code of this file.
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::gpkg |
Functions | |
| void | openswmm::gpkg::read_external_content (sqlite3 *db, openswmm::SimulationContext &ctx, const std::string &simulation_id, const std::string &scratch_dir) |
Hydrate every external-file slot on ctx from the Part D tables and materialise scratch files in scratch_dir. | |
| std::string | openswmm::gpkg::scratchDirFor (const std::string &gpkg_path) |
Compute the canonical scratch-dir path for a given .gpkg file. | |
Slice IO-8 — hydrate SimulationContext external-file slots from the Part D GeoPackage tables and materialise scratch files in the legacy on-disk format so legacy fopen sites keep working.
Companion to ExternalContentWriter. For each role with rows present in the Part D tables:
<gpkg-stem>.scratch/.FilePathPair:.absolute ← scratch file path (ready for fopen)..original ← diagnostic sentinel of the form "<gpkg:role:owner>" so InpWriter does not emit a stale path token if the model is later saved as .inp.Scratch directory sits next to the .gpkg rather than in $TMPDIR so a reviewer can inspect what was fed to the engine (CLAUDE.md §4 transparent-IO directive).
On engine close, the orchestrator deletes the scratch directory; that hookup arrives with the C-API/engine lifecycle slice and is not part of IO-8.