Class SmcPluginBase
Defined in File smc_plugin_base.hpp
Class Documentation
-
class SmcPluginBase
Base class providing the minimum interface required by a plugin to work with SMC.
Public Types
-
using DataExchange = std::unordered_map<std::string, std::variant<int64_t, double, bool>>
The data structure containing all the variables serving as interface between this plugin and the SMC engine.
Public Functions
-
virtual ~SmcPluginBase() = default
-
virtual std::string getPluginName() = 0
Get a string containing the plugin name.
- Returns:
The string ID of the loaded plugin instance (e.g. “SmcPluginBase”)
-
inline virtual void setRandomSeed(const uint32_t seed)
Set the random seed for the plugin.
- Parameters:
seed – The seed value to set
-
inline void loadParameters(const DataExchange &config)
Configure the plugin before resetting and using it.
- Parameters:
config – The configuration parameters
-
inline DataExchange reset()
Reset the plugin to the initial state.
- Returns:
The initial state of the output variables
-
inline DataExchange nextStep(const DataExchange &input_data)
Advances the plugin to the next state.
- Parameters:
input_data – The data used to control the evolution of the plugin
- Returns:
The output values associated to the new reached state
Protected Functions
-
virtual void processInitParameters(const DataExchange &config) = 0
Process the provided plugin’s configuration.
- Parameters:
config – The structure containing the configuration to load.
-
virtual DataExchange processReset() = 0
Reset the plugin to the initial state.
- Returns:
The initial state of the output variables.
-
virtual DataExchange processInputParameters(const DataExchange &config) = 0
Process the input parameters provided to advance the plugin to its next state.
- Parameters:
config – The structure containing the configuration to load.
- Returns:
The new plugin state, after getting to its next state.
-
inline void setParamsLoaded()
-
inline void checkParamsLoaded()
-
using DataExchange = std::unordered_map<std::string, std::variant<int64_t, double, bool>>