1#include "state_representation/space/SpatialState.hpp"
3#include "state_representation/exceptions/InvalidCastException.hpp"
8 this->
set_type(StateType::SPATIAL_STATE);
12 State(name), reference_frame_(reference_frame) {
13 this->
set_type(StateType::SPATIAL_STATE);
17 this->
set_type(StateType::SPATIAL_STATE);
27 return this->reference_frame_;
31 this->reference_frame_ = reference_frame;
42 return (this->
get_name() != other.reference_frame_) && (this->reference_frame_ != other.get_name())
44 }
catch (
const std::bad_cast& ex) {
46 std::string(
"Could not cast the given object to a SpatialState: ") + ex.what());
56 os << state.to_string();
virtual void set_reference_frame(const std::string &reference_frame)
Setter of the reference frame.
bool is_incompatible(const State &state) const override
Check if the spatial state is incompatible for operations with the state given as argument.
SpatialState & operator=(const SpatialState &state)
Copy assignment operator that has to be defined to the custom assignment operator.
std::string to_string() const override
Convert the state to its string representation.
const std::string & get_reference_frame() const
Getter of the reference frame as const reference.
SpatialState()
Empty constructor.
friend void swap(SpatialState &state1, SpatialState &state2)
Swap the values of the two SpatialState.
Abstract class to represent a state.
void reset_timestamp()
Reset the timestamp attribute to now.
const std::string & get_name() const
Getter of the name attribute.
void set_type(const StateType &type)
Setter of the state type attribute.
virtual std::string to_string() const
Convert the state to its string representation.
Core state variables and objects.
std::ostream & operator<<(std::ostream &os, const AnalogIOState &state)