![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Interface for report-writing plugins. More...
#include <IReportPlugin.hpp>
Public Member Functions | |
| virtual | ~IReportPlugin ()=default |
| virtual PluginState | state () const noexcept=0 |
| Query the current plugin state. | |
| virtual int | initialize (const std::vector< std::string > &init_args, const class IPluginComponentInfo *info)=0 |
| Initialize from [PLUGINS] arguments. | |
| virtual int | validate (const SimulationContext &ctx)=0 |
| Validate configuration against the loaded model. | |
| virtual int | prepare (const SimulationContext &ctx)=0 |
| Open report file(s) and write any headers. | |
| virtual int | update (const SimulationSnapshot &snapshot) |
| Accumulate data from one output step. Called from IO thread. | |
| virtual int | write_summary (const SimulationContext &ctx)=0 |
| Write the final summary report. Called from main thread. | |
| virtual int | finalize (const SimulationContext &ctx)=0 |
| Flush and close report file(s). | |
| virtual const char * | last_error_message () const noexcept |
| Get the last error message. | |
Interface for report-writing plugins.
|
virtualdefault |
|
pure virtual |
Flush and close report file(s).
| ctx | Final simulation context. |
Implemented in openswmm::DefaultReportPlugin.
|
pure virtual |
Initialize from [PLUGINS] arguments.
| init_args | Tokenized arguments from the [PLUGINS] line. |
| info | Back-pointer to IPluginComponentInfo. |
|
inlinevirtualnoexcept |
Get the last error message.
Reimplemented in openswmm::DefaultReportPlugin.
|
pure virtual |
Open report file(s) and write any headers.
| ctx | Simulation context. |
Implemented in openswmm::DefaultReportPlugin.
|
pure virtualnoexcept |
Query the current plugin state.
Implemented in openswmm::DefaultReportPlugin.
|
inlinevirtual |
Accumulate data from one output step. Called from IO thread.
This is optional — some report plugins only use write_summary() and do nothing in update(). The default implementation is a no-op.
| snapshot | Read-only simulation state at this output time step. |
Reimplemented in openswmm::DefaultReportPlugin.
|
pure virtual |
Validate configuration against the loaded model.
| ctx | Simulation context (after input parsing). |
Implemented in openswmm::DefaultReportPlugin.
|
pure virtual |
Write the final summary report. Called from main thread.
Called after all update() calls have completed and finalize() has returned. Write summary statistics (peak flows, volumes, mass balance errors, etc.).
| ctx | Final simulation context (contains statistics). |
Implemented in openswmm::DefaultReportPlugin.