![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Own configuration and input IO state for a GeoPackage adapter. More...
#include <GeoPackageInputPlugin.hpp>
Public Member Functions | |
| GeoPackageInputPlugin ()=default | |
| Create an unloaded input 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 input adapter configuration without opening the database. | |
| int | validate (const SimulationContext &ctx) override |
| Mark the adapter validated without inspecting the model. | |
| int | read (const std::string &path, SimulationContext &ctx) override |
| Read one simulation from a read-only GeoPackage connection. | |
| int | write (const std::string &path, const SimulationContext &ctx) override |
| Write the model into the configured simulation of a GeoPackage. | |
| std::vector< std::string > | skipped_sections () const override |
| Return the adapter's unsupported-section listing. | |
| int | finalize (const SimulationContext &ctx) override |
| Mark the input adapter finalized. | |
| const char * | last_error_message () const noexcept override |
| Borrow the most recently stored failure diagnostic. | |
Public Member Functions inherited from openswmm::IInputPlugin | |
| virtual | ~IInputPlugin ()=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. | |
Own configuration and input 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 input adapter with no open database.
|
overridevirtual |
Mark the input adapter finalized.
| [in] | ctx | Unused borrowed context. |
Implements openswmm::IInputPlugin.
|
overridevirtual |
Copy input 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. SRS uses stoi prefix parsing; its exceptions are caught and set SRS zero.
| [in] | init_args | Borrowed arguments: [0] simulation ID (default retained/default), [1] optional SRS integer; missing entries preserve prior configuration. |
| [in] | info | Unused borrowed metadata pointer; NULL is accepted. |
Implements openswmm::IInputPlugin.
|
inlineoverridevirtualnoexcept |
Borrow the most recently stored failure diagnostic.
Success does not consistently clear an earlier diagnostic.
Reimplemented from openswmm::IInputPlugin.
|
overridevirtual |
Read one simulation from a read-only GeoPackage connection.
When configured ID equals default, selects the first returned simulations row (no ordering guarantee), then nodes fallback if none. Stores that selected ID for later calls. Does not change PluginState on read result and does not enforce initialized/validated state.
| [in] | path | Borrowed existing .gpkg filename, opened read-only. |
| [in,out] | ctx | Caller-owned context populated directly by read_model(); no rollback of partial context adoption is supplied by this adapter. |
Implements openswmm::IInputPlugin.
|
inlineoverridevirtual |
Return the adapter's unsupported-section listing.
Reimplemented from openswmm::IInputPlugin.
|
inlineoverridevirtualnoexcept |
Read the stored adapter lifecycle marker.
Implements openswmm::IInputPlugin.
|
overridevirtual |
Mark the adapter validated without inspecting the model.
| [in] | ctx | Unused borrowed context; no model/schema/file validation is performed. |
Implements openswmm::IInputPlugin.
|
overridevirtual |
Write the model into the configured simulation of a GeoPackage.
Creates/updates schema, infers SRS from text after a CRS colon only when configured SRS is zero, and registers a positive inferred EPSG row. No model CRS transform. Does not change adapter state; writer controls transaction semantics.
| [in] | path | Borrowed destination opened READWRITE|CREATE; existing model rows may be replaced by write_model(). |
| [in] | ctx | Borrowed aligned model context; retained scalar/vector metadata is copied where needed, not owned through this reference. |
Implements openswmm::IInputPlugin.