7#include "state_representation/exceptions/InvalidParameterException.hpp" 
    8#include "state_representation/parameters/Parameter.hpp" 
   12typedef std::list<std::shared_ptr<ParameterInterface>> ParameterInterfaceList;
 
   13typedef std::map<std::string, std::shared_ptr<ParameterInterface>> ParameterInterfaceMap;
 
   31  explicit ParameterMap(
const ParameterInterfaceList& parameters);
 
   37  explicit ParameterMap(
const ParameterInterfaceMap& parameters);
 
   44  [[nodiscard]] std::shared_ptr<ParameterInterface> 
get_parameter(
const std::string& name) 
const;
 
   71  void set_parameter(
const std::shared_ptr<ParameterInterface>& parameter);
 
 
A wrapper class to contain a map of Parameter pointers by name and provide robust access methods.
 
ParameterMap()=default
Empty constructor.
 
ParameterInterfaceMap get_parameters() const
Get a map of all the <name, parameter> pairs.
 
ParameterInterfaceList get_parameter_list() const
Get a list of all the parameters.
 
void assert_parameter_valid(const std::shared_ptr< ParameterInterface > ¶meter)
Check if a parameter exists and has the expected type, throw an exception otherwise.
 
virtual void validate_and_set_parameter(const std::shared_ptr< ParameterInterface > ¶meter)
Validate and set a parameter in the map.
 
std::shared_ptr< ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by its name.
 
void remove_parameter(const std::string &name)
Remove a parameter from the parameter map.
 
T get_parameter_value(const std::string &name) const
Get a parameter value by its name.
 
void set_parameters(const ParameterInterfaceList ¶meters)
Set parameters from a list of parameters.
 
ParameterInterfaceMap parameters_
map of parameters by name
 
void set_parameter(const std::shared_ptr< ParameterInterface > ¶meter)
Set a parameter.
 
void set_parameter_value(const std::string &name, const T &value)
Set a parameter value by its name.
 
Core state variables and objects.