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

Interface for state / hot-start IO plugins. More...

#include <string>
#include <vector>
#include "PluginState.hpp"
Include dependency graph for IStateIOPlugin.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmm::IStateIOPlugin
 Interface for state / hot-start IO plugins. More...
 

Namespaces

namespace  openswmm
 

Detailed Description

Interface for state / hot-start IO plugins.

Implement this interface to support reading and writing simulation state (also called "hot-start") to and from different file formats (e.g., the built-in OpenSWMM binary, legacy SWMM5 binary, HDF5, NetCDF, cloud blob storage).

State plugins are responsible for:

  • Reading a persisted simulation state into a SimulationContext BEFORE simulation starts (engine in INITIALIZED state).
  • Writing the current simulation state to a path during a run (scheduled checkpoints) or once at the end (final snapshot).

Threading model: All methods are called from the main thread.

The engine resolves which plugin handles a given path on read by calling can_read() on each registered state plugin in turn; the first match wins, with the built-in default plugin acting as fallback so legacy formats keep working when no external plugin claims them.