3#include "state_representation/State.hpp"
8 std::string reference_frame_;
30 const StateType& type,
const std::string& name,
const std::string& reference_frame =
"world",
31 const bool& empty =
true
82 std::swap(state1.reference_frame_, state2.reference_frame_);
92 return this->reference_frame_;
96 this->reference_frame_ = reference_frame;
101 && (this->reference_frame_ ==
dynamic_cast<const SpatialState&
>(state).reference_frame_);
SpatialState(const SpatialState &state)=default
Copy constructor from another SpatialState.
virtual void set_reference_frame(const std::string &reference_frame)
Setter of the reference frame.
virtual bool is_compatible(const State &state) const override
Check if the state is compatible for operations with the state given as argument.
SpatialState & operator=(const SpatialState &state)
Copy assignment operator that have to be defined to the custom assignment operator.
friend std::ostream & operator<<(std::ostream &os, const SpatialState &state)
Overload the ostream operator for printing.
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.
const std::string & get_name() const
Getter of the name as const reference.
Core state variables and objects.
void swap(CartesianState &state1, CartesianState &state2)
StateType
The class types inheriting from State.