OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::gpkg::GeoPackageReportPlugin Class Reference

#include <GeoPackageReportPlugin.hpp>

Inheritance diagram for openswmm::gpkg::GeoPackageReportPlugin:
Collaboration diagram for openswmm::gpkg::GeoPackageReportPlugin:

Public Member Functions

 GeoPackageReportPlugin ()=default
 
PluginState state () const noexcept override
 Query the current plugin state.
 
int initialize (const std::vector< std::string > &init_args, const IPluginComponentInfo *info) override
 
int validate (const SimulationContext &ctx) override
 Validate configuration against the loaded model.
 
int prepare (const SimulationContext &ctx) override
 Open report file(s) and write any headers.
 
int update (const SimulationSnapshot &snapshot) override
 Accumulate data from one output step. Called from IO thread.
 
int write_summary (const SimulationContext &ctx) override
 Write the final summary report. Called from main thread.
 
int finalize (const SimulationContext &ctx) override
 Flush and close report file(s).
 
const char * last_error_message () const noexcept override
 Get the last error message.
 
- Public Member Functions inherited from openswmm::IReportPlugin
virtual ~IReportPlugin ()=default
 
virtual int initialize (const std::vector< std::string > &init_args, const class IPluginComponentInfo *info)=0
 Initialize from [PLUGINS] arguments.
 

Constructor & Destructor Documentation

◆ GeoPackageReportPlugin()

openswmm::gpkg::GeoPackageReportPlugin::GeoPackageReportPlugin ( )
default

Member Function Documentation

◆ finalize()

int openswmm::gpkg::GeoPackageReportPlugin::finalize ( const SimulationContext ctx)
overridevirtual

Flush and close report file(s).

Parameters
ctxFinal simulation context.
Returns
0 on success.
Postcondition
state() == PluginState::FINALIZED on success.

Implements openswmm::IReportPlugin.

◆ initialize()

int openswmm::gpkg::GeoPackageReportPlugin::initialize ( const std::vector< std::string > &  init_args,
const IPluginComponentInfo info 
)
override

◆ last_error_message()

const char * openswmm::gpkg::GeoPackageReportPlugin::last_error_message ( ) const
inlineoverridevirtualnoexcept

Get the last error message.

Reimplemented from openswmm::IReportPlugin.

◆ prepare()

int openswmm::gpkg::GeoPackageReportPlugin::prepare ( const SimulationContext ctx)
overridevirtual

Open report file(s) and write any headers.

Parameters
ctxSimulation context.
Returns
0 on success.
Postcondition
state() == PluginState::PREPARED on success.

Implements openswmm::IReportPlugin.

Here is the call graph for this function:

◆ state()

PluginState openswmm::gpkg::GeoPackageReportPlugin::state ( ) const
inlineoverridevirtualnoexcept

Query the current plugin state.

Implements openswmm::IReportPlugin.

◆ update()

int openswmm::gpkg::GeoPackageReportPlugin::update ( const SimulationSnapshot snapshot)
overridevirtual

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.

Parameters
snapshotRead-only simulation state at this output time step.
Returns
0 on success.

Reimplemented from openswmm::IReportPlugin.

◆ validate()

int openswmm::gpkg::GeoPackageReportPlugin::validate ( const SimulationContext ctx)
overridevirtual

Validate configuration against the loaded model.

Parameters
ctxSimulation context (after input parsing).
Returns
0 on success.
Postcondition
state() == PluginState::VALIDATED on success.

Implements openswmm::IReportPlugin.

◆ write_summary()

int openswmm::gpkg::GeoPackageReportPlugin::write_summary ( const SimulationContext ctx)
overridevirtual

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.).

Parameters
ctxFinal simulation context (contains statistics).
Returns
0 on success.

Implements openswmm::IReportPlugin.

Here is the call graph for this function:

The documentation for this class was generated from the following files: