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

#include <GeoPackageInputPlugin.hpp>

Inheritance diagram for openswmm::gpkg::GeoPackageInputPlugin:
Collaboration diagram for openswmm::gpkg::GeoPackageInputPlugin:

Public Member Functions

 GeoPackageInputPlugin ()=default
 
PluginState state () const noexcept override
 Query the current plugin state.
 
int initialize (const std::vector< std::string > &init_args, const IPluginComponentInfo *info) override
 Initialize from [PLUGINS] arguments.
 
int validate (const SimulationContext &ctx) override
 Validate configuration against the loaded model.
 
int read (const std::string &path, SimulationContext &ctx) override
 Read a SWMM model from a GeoPackage file.
 
int write (const std::string &path, const SimulationContext &ctx) override
 Write a SWMM model to a GeoPackage file.
 
std::vector< std::string > skipped_sections () const override
 Sections or elements that were skipped during the last read().
 
int finalize (const SimulationContext &ctx) override
 Finalize and release resources.
 
const char * last_error_message () const noexcept override
 Get the last error message.
 
- Public Member Functions inherited from openswmm::IInputPlugin
virtual ~IInputPlugin ()=default
 

Constructor & Destructor Documentation

◆ GeoPackageInputPlugin()

openswmm::gpkg::GeoPackageInputPlugin::GeoPackageInputPlugin ( )
default

Member Function Documentation

◆ finalize()

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

Finalize and release resources.

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

Implements openswmm::IInputPlugin.

◆ initialize()

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

Initialize from [PLUGINS] arguments.

Parameters
init_argsTokenized arguments from the [PLUGINS] line.
infoBack-pointer to IPluginComponentInfo.
Returns
0 on success.
Postcondition
state() == PluginState::INITIALIZED on success.

Implements openswmm::IInputPlugin.

◆ last_error_message()

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

Get the last error message.

Reimplemented from openswmm::IInputPlugin.

◆ read()

int openswmm::gpkg::GeoPackageInputPlugin::read ( const std::string &  path,
SimulationContext ctx 
)
overridevirtual

Read a SWMM model from a GeoPackage file.

Reads the model for the configured simulation_id. If no simulation_id was specified, reads the first (or only) model.

Parameters
pathPath to the .gpkg file.
ctxSimulationContext to populate.
Returns
0 on success.

Implements openswmm::IInputPlugin.

Here is the call graph for this function:

◆ skipped_sections()

std::vector< std::string > openswmm::gpkg::GeoPackageInputPlugin::skipped_sections ( ) const
inlineoverridevirtual

Sections or elements that were skipped during the last read().

Returns identifiers for any input sections or elements that had no handler and were ignored. For .inp files these are section tags like "MY_UNKNOWN_SECTION". Other formats may return their own identifiers (e.g., JSON keys).

Returns
Vector of skipped section/element identifiers (empty by default).

Reimplemented from openswmm::IInputPlugin.

◆ state()

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

Query the current plugin state.

Implements openswmm::IInputPlugin.

◆ validate()

int openswmm::gpkg::GeoPackageInputPlugin::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::IInputPlugin.

◆ write()

int openswmm::gpkg::GeoPackageInputPlugin::write ( const std::string &  path,
const SimulationContext ctx 
)
overridevirtual

Write a SWMM model to a GeoPackage file.

Parameters
pathPath to the output .gpkg file.
ctxSimulationContext to serialize.
Returns
0 on success.

Implements openswmm::IInputPlugin.

Here is the call graph for this function:

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