1#include "state_representation/parameters/ParameterMap.hpp"
14 if (this->
parameters_.find(name) == this->parameters_.cend()) {
25 ParameterInterfaceList param_list;
27 param_list.template emplace_back(param_it.second);
37 for (
const auto& param: parameters) {
43 for (
const auto& param_it: parameters) {
49 if (this->
parameters_.at(parameter->get_name())->get_type() != parameter->get_type()) {
51 "Parameter '" + parameter->get_name() +
"' exists, but has unexpected type."
57 this->
parameters_.insert_or_assign(parameter->get_name(), parameter);
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 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.
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.
Core state variables and objects.