Control Libraries 7.4.0
Loading...
Searching...
No Matches
ParameterInterface.cpp
1#include "state_representation/parameters/ParameterInterface.hpp"
2
3namespace state_representation {
4
6 const std::string& name, const ParameterType& type, const StateType& parameter_state_type
7) : State(name), parameter_type_(type), parameter_state_type_(parameter_state_type) {
8 this->set_type(StateType::PARAMETER);
9}
10
12 State(parameter),
13 parameter_type_(parameter.get_parameter_type()),
14 parameter_state_type_(parameter.get_parameter_state_type()) {
15 this->set_type(StateType::PARAMETER);
16}
17
19 State::operator=(state);
20 this->parameter_type_ = state.get_parameter_type();
21 this->parameter_state_type_ = state.get_parameter_state_type();
22 return (*this);
23}
24
26 return parameter_type_;
27}
28
30 return parameter_state_type_;
31}
32
33}// namespace state_representation
StateType get_parameter_state_type() const
Get the state type of the parameter.
ParameterInterface & operator=(const ParameterInterface &state)
Copy assignment operator that has to be defined to the custom assignment operator.
ParameterType get_parameter_type() const
Get the parameter type.
ParameterInterface(const std::string &name, const ParameterType &type, const StateType &parameter_state_type=StateType::NONE)
Constructor with parameter name and type.
Abstract class to represent a state.
Definition State.hpp:25
void set_type(const StateType &type)
Setter of the state type attribute.
Definition State.cpp:41
State & operator=(const State &state)
Copy assignment operator that has to be defined to the custom assignment operator.
Definition State.cpp:19
Core state variables and objects.
ParameterType
The parameter value types.
StateType
The class types inheriting from State.
Definition StateType.hpp:13