![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Own configuration and report IO state for a GeoPackage adapter. More...
#include <GeoPackageReportPlugin.hpp>
Public Member Functions | |
| GeoPackageReportPlugin ()=default | |
| Create an unloaded report adapter with no open database. | |
| PluginState | state () const noexcept override |
| Read the stored adapter lifecycle marker. | |
| int | initialize (const std::vector< std::string > &init_args, const IPluginComponentInfo *info) override |
| Copy report adapter configuration without opening the database. | |
| int | validate (const SimulationContext &ctx) override |
| Mark the adapter validated without inspecting the model. | |
| int | prepare (const SimulationContext &ctx) override |
| Open/create the database and cache existing variable identifiers. | |
| int | update (const SimulationSnapshot &snapshot) override |
| Accept a snapshot without per-step work. | |
| int | write_summary (const SimulationContext &ctx) override |
| Write selected object statistics and run continuity summaries. | |
| int | finalize (const SimulationContext &ctx) override |
| Close the owned report database and mark finalized. | |
| const char * | last_error_message () const noexcept override |
| Borrow the most recently stored failure diagnostic. | |
Public Member Functions inherited from openswmm::IReportPlugin | |
| virtual | ~IReportPlugin ()=default |
| Destroy this polymorphic instance after its callbacks and resource lifecycle finish. Default base destructor performs no finalize, file flush, I/O-thread join or model cleanup. Host deletes instances while their library remains loaded; implementations release owned resources safely. Never delete shared component metadata here. | |
| virtual int | initialize (const std::vector< std::string > &init_args, const class IPluginComponentInfo *info)=0 |
| Parse instance configuration before model validation/preparation. | |
Own configuration and report IO state for a GeoPackage adapter.
Caller follows initialize/validate/prepare/update/finalize ordering as applicable and serializes all calls. State markers are descriptive; most methods do not enforce ordering. SQLite handles are privately owned; borrowed contexts/snapshots must remain valid during synchronous calls.
|
default |
Create an unloaded report adapter with no open database.
|
overridevirtual |
Close the owned report database and mark finalized.
| [in] | ctx | Unused borrowed context. |
Implements openswmm::IReportPlugin.
|
override |
Copy report adapter configuration without opening the database.
Sets INITIALIZED on success. Does not clear prior diagnostic/cache/buffer state; use a fresh adapter per independently configured run. Allocation exceptions can propagate during argument copying.
| [in] | init_args | Borrowed arguments: [0] required database path, [1] optional simulation ID (default run_1). Extra arguments are ignored. |
| [in] | info | Unused borrowed metadata pointer; NULL is accepted. |
|
inlineoverridevirtualnoexcept |
Borrow the most recently stored failure diagnostic.
Success does not consistently clear an earlier diagnostic.
Reimplemented from openswmm::IReportPlugin.
|
overridevirtual |
Open/create the database and cache existing variable identifiers.
Requires variables schema already present; this adapter does not call create_schema(). Sets PREPARED only on success; failure stores diagnostic without forcing ERROR. Exact variable cache entries from earlier preparation are not cleared.
| [in] | ctx | Unused borrowed context; model values are read later in write_summary(). |
Implements openswmm::IReportPlugin.
|
inlineoverridevirtualnoexcept |
Read the stored adapter lifecycle marker.
Implements openswmm::IReportPlugin.
|
overridevirtual |
Accept a snapshot without per-step work.
| [in] | snapshot | Unused borrowed snapshot; final summary reads context statistics instead. |
Reimplemented from openswmm::IReportPlugin.
|
overridevirtual |
Mark the adapter validated without inspecting the model.
| [in] | ctx | Unused borrowed context; no model/schema/file validation is performed. |
Implements openswmm::IReportPlugin.
|
overridevirtual |
Write selected object statistics and run continuity summaries.
Requires prepared DB/schema/cache and aligned report-flag arrays. Stores raw context statistics without display conversion: internal ft/cfs/ft3 and seconds where applicable, dimensionless filling. Missing variable IDs skip individual rows. Sets run quality-continuity field to the current placeholder zero. SQLite bind/step statuses are discarded; exceptions trigger best-effort transaction rollback.
| [in] | ctx | Borrowed aligned model context; retained scalar/vector metadata is copied where needed, not owned through this reference. |
Implements openswmm::IReportPlugin.