#include <GeoPackageOutputPlugin.hpp>
◆ GeoPackageOutputPlugin()
| openswmm::gpkg::GeoPackageOutputPlugin::GeoPackageOutputPlugin |
( |
| ) |
|
|
default |
◆ finalize()
| int openswmm::gpkg::GeoPackageOutputPlugin::finalize |
( |
const SimulationContext & |
ctx | ) |
|
|
overridevirtual |
Flush and close output file(s). Called from main thread.
Called after the simulation loop ends and the IO thread has been joined. All update() calls have completed at this point. Flush any write buffers and close file handles.
- Parameters
-
| ctx | Read-only simulation context (for final state / metadata). |
- Returns
- 0 on success; non-zero on error.
- Postcondition
- state() == PluginState::FINALIZED on success.
Implements openswmm::IOutputPlugin.
◆ initialize()
| int openswmm::gpkg::GeoPackageOutputPlugin::initialize |
( |
const std::vector< std::string > & |
init_args, |
|
|
const IPluginComponentInfo * |
info |
|
) |
| |
|
override |
◆ last_error_message()
| const char * openswmm::gpkg::GeoPackageOutputPlugin::last_error_message |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
Get the last error message from this plugin instance.
- Returns
- Null-terminated error string, or empty string if no error.
Reimplemented from openswmm::IOutputPlugin.
◆ prepare()
Open output file(s) and write headers.
Called after validate() succeeds, just before the simulation loop begins. Open file handles, allocate write buffers, and write any file headers.
- Parameters
-
| ctx | Read-only simulation context. |
- Returns
- 0 on success; non-zero on error.
- Postcondition
- state() == PluginState::PREPARED on success.
Implements openswmm::IOutputPlugin.
◆ state()
| PluginState openswmm::gpkg::GeoPackageOutputPlugin::state |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
◆ update()
Write one output snapshot. Called from the IO thread.
Called at each output time step with a read-only snapshot of the simulation state. This method runs on the IO thread — it must NOT access the live SimulationContext.
- Parameters
-
| snapshot | Read-only simulation state at this output time step. |
- Returns
- 0 on success; non-zero on error (transitions to ERROR state).
- Note
- This may be called concurrently with the main simulation thread advancing the next timestep. Use only snapshot data.
Implements openswmm::IOutputPlugin.
◆ validate()
| int openswmm::gpkg::GeoPackageOutputPlugin::validate |
( |
const SimulationContext & |
ctx | ) |
|
|
overridevirtual |
Validate plugin configuration against the simulation model.
Called after the input file is fully parsed and the model is loaded. Check that configured output paths are writable, that requested object IDs exist, etc.
- Parameters
-
| ctx | Read-only view of the simulation context (for model metadata). |
- Returns
- 0 on success; non-zero on error.
- Postcondition
- state() == PluginState::VALIDATED on success.
Implements openswmm::IOutputPlugin.
The documentation for this class was generated from the following files: