1 #ifndef AIKIDO_STATESPACE_STATEHANDLE_HPP_ 2 #define AIKIDO_STATESPACE_STATEHANDLE_HPP_ 15 template <
class _StateSpace,
class _QualifiedState>
19 using StateSpace = _StateSpace;
20 using QualifiedState = _QualifiedState;
23 using ConstState =
typename std::conditional<
24 std::is_const<QualifiedState>::value,
26 const QualifiedState>::type;
35 StateHandle(
const StateSpace* space, QualifiedState* state);
44 operator QualifiedState*()
const;
53 void reset(
const StateSpace* space, QualifiedState* state);
59 template <
typename Q = QualifiedState>
61 typename std::enable_if<!std::is_const<Q>::value, Q*>::type;
68 template <
typename Q = QualifiedState>
70 typename std::conditional<std::is_const<Q>::value, Q*,
const Q*>::type;
88 #include "detail/StateHandle-impl.hpp" 90 #endif // AIKIDO_STATESPACE_STATEHANDLE_HPP_ Wrap a State with its StateSpace to provide convenient accessor methods.
Definition: StateHandle.hpp:16
void reset()
Resets StateHandle to nullptr.
Definition: StateHandle-impl.hpp:32
StateHandle()
Constructs a nullptr handle.
Definition: StateHandle-impl.hpp:8
Represents the Cartesian product of other StateSpaces.
Definition: CartesianProduct.hpp:18
const StateSpace * mSpace
State space of the sate that is managed by this handler.
Definition: StateHandle.hpp:79
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
const StateSpace * getStateSpace() const
Returns the state space that created this state.
Definition: StateHandle-impl.hpp:66
QualifiedState * mState
State managed by this handler. This can be either const or non-const type.
Definition: StateHandle.hpp:82
auto getState() -> typename std::enable_if<!std::is_const< Q >::value, Q *>::type
Returns the State.
Definition: StateHandle-impl.hpp:49