27#ifndef OPENSWMM_GEOPACKAGE_OUTPUT_PLUGIN_HPP
28#define OPENSWMM_GEOPACKAGE_OUTPUT_PLUGIN_HPP
33#include <unordered_map>
44 int initialize(
const std::vector<std::string>& init_args,
53 return error_msg_.c_str();
58 std::string error_msg_;
60 std::string simulation_id_;
65 std::unordered_map<std::string, int> variable_ids_;
69 std::string object_type;
70 std::string object_id;
75 std::vector<ResultRow> buffer_;
76 static constexpr size_t FLUSH_THRESHOLD = 5000;
79 int lookup_variable(
const std::string& name,
const std::string& obj_type);
97 std::vector<char> subcatch_rpt_flag_;
98 std::vector<char> node_rpt_flag_;
99 std::vector<char> link_rpt_flag_;
RAII wrappers and utilities for SQLite operations in GeoPackage I/O.
Interface for output-writing plugins.
Interface for output-writing plugins.
Definition IOutputPlugin.hpp:73
Describes a plugin component: metadata, capabilities, and factory methods.
Definition IPluginComponentInfo.hpp:195
GeoPackageOutputPlugin()=default
int update(const SimulationSnapshot &snapshot) override
Write one output snapshot. Called from the IO thread.
Definition GeoPackageOutputPlugin.cpp:200
int initialize(const std::vector< std::string > &init_args, const IPluginComponentInfo *info) override
Definition GeoPackageOutputPlugin.cpp:117
int prepare(const SimulationContext &ctx) override
Open output file(s) and write headers.
Definition GeoPackageOutputPlugin.cpp:134
int validate(const SimulationContext &ctx) override
Validate plugin configuration against the simulation model.
Definition GeoPackageOutputPlugin.cpp:129
int finalize(const SimulationContext &ctx) override
Flush and close output file(s). Called from main thread.
Definition GeoPackageOutputPlugin.cpp:470
PluginState state() const noexcept override
Query the current plugin state.
Definition GeoPackageOutputPlugin.hpp:42
const char * last_error_message() const noexcept override
Get the last error message from this plugin instance.
Definition GeoPackageOutputPlugin.hpp:52
PluginState
Plugin lifecycle states.
Definition PluginState.hpp:83
@ UNLOADED
Library not yet loaded (or was closed).
Definition PluginState.hpp:84
Definition ExternalContentReader.cpp:49
std::unique_ptr< sqlite3_stmt, StmtDeleter > StmtPtr
Definition GpkgUtils.hpp:103
std::unique_ptr< sqlite3, DbDeleter > DbPtr
Definition GpkgUtils.hpp:58
Central, reentrant simulation context.
Definition SimulationContext.hpp:353
Complete simulation state snapshot at one output time step.
Definition SimulationSnapshot.hpp:117
Central, reentrant simulation context.
Definition SimulationContext.hpp:353