![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Slice IO-7 — fan-out from in-memory external-file slots to the Part D GeoPackage tables. More...
#include <string>Go to the source code of this file.
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::gpkg |
Functions | |
| void | openswmm::gpkg::write_external_content (sqlite3 *db, const openswmm::SimulationContext &ctx, const std::string &simulation_id) |
Populate the Part D content tables for simulation_id from the in-memory model. | |
Slice IO-7 — fan-out from in-memory external-file slots to the Part D GeoPackage tables.
Walks every external-file slot on SimulationContext (ctx.files, ctx.gages.file_path[], ctx.options.temp_file, file-backed ctx.tables.tables[i].file_path) and:
SAVE-direction and the file does not exist yet, a ‘status='pending’` parent row is written (hotstart_slots only — other SAVE slots don't carry an explicit pending registry today) so the engine's output plugin can populate it after the simulation finishes.USE-direction but the referenced file is missing, the writer throws a GpkgError — saving a model that references unreadable USE files would silently lose the inputs.Per the plan §3.5 the writer presumes PostParseResolver has already populated slot.absolute. Programmatic models with only slot.original set are handled too — the helper falls back to the original token verbatim and lets fopen decide.