41#ifndef OPENSWMM_ENGINE_DEFAULT_STATE_IO_PLUGIN_HPP
42#define OPENSWMM_ENGINE_DEFAULT_STATE_IO_PLUGIN_HPP
70 int initialize(
const std::vector<std::string>& init_args,
84 bool can_read(
const std::string& path)
const override;
108 std::vector<std::string>
warnings()
const override {
return warnings_; }
122 std::string last_error_;
123 std::vector<std::string> warnings_;
Interface for state / hot-start IO plugins.
DefaultStateIOPlugin()=default
Construct an UNLOADED stateless hot-start facade with empty diagnostics.
PluginState state() const noexcept override
Read the last assigned lifecycle marker without synchronization.
Definition DefaultStateIOPlugin.hpp:64
int validate(const SimulationContext &ctx) override
Mark VALIDATED without inspecting model compatibility.
Definition DefaultStateIOPlugin.cpp:90
int write_state(const std::string &path, const SimulationContext &ctx) override
Save current model/solver state through HotStartManager.
Definition DefaultStateIOPlugin.cpp:154
std::vector< std::string > warnings() const override
Copy warnings collected by the last read_state()/write_state() cycle.
Definition DefaultStateIOPlugin.hpp:108
bool can_read(const std::string &path) const override
Probe a leading hot-start signature or a recognized filename suffix.
Definition DefaultStateIOPlugin.cpp:104
int finalize(const SimulationContext &ctx) override
Mark FINALIZED without opening/closing a persistent stream.
Definition DefaultStateIOPlugin.cpp:95
int initialize(const std::vector< std::string > &init_args, const IPluginComponentInfo *info) override
Mark INITIALIZED and clear last_error.
Definition DefaultStateIOPlugin.cpp:83
const char * last_error_message() const noexcept override
Borrow the stored diagnostic text without clearing it.
Definition DefaultStateIOPlugin.hpp:118
int read_state(const std::string &path, SimulationContext &ctx) override
Open and apply a hot-start through HotStartManager.
Definition DefaultStateIOPlugin.cpp:123
Describes a plugin component: metadata, capabilities, and factory methods.
Definition IPluginComponentInfo.hpp:201
Interface for state / hot-start IO plugins.
Definition IStateIOPlugin.hpp:71
PluginState
Plugin lifecycle states.
Definition PluginState.hpp:86
@ UNLOADED
Library not yet loaded (or was closed).
Definition PluginState.hpp:87
Definition ExchangeLaw.hpp:60
Central, reentrant simulation context.
Definition SimulationContext.hpp:390