37 #ifndef OMPL_BASE_STATE_
38 #define OMPL_BASE_STATE_
40 #include <boost/concept_check.hpp>
56 const State &operator=(
const State &) =
delete;
61 virtual ~
State() =
default;
69 BOOST_CONCEPT_ASSERT((boost::Convertible<T *, State *>));
71 return static_cast<const T *
>(
this);
79 BOOST_CONCEPT_ASSERT((boost::Convertible<T *, State *>));
81 return static_cast<T *
>(
this);
95 const T *
as(
unsigned int index)
const
98 BOOST_CONCEPT_ASSERT((boost::Convertible<T *, State *>));
100 return static_cast<const T *
>(
components[index]);
105 T *
as(
const unsigned int index)
108 BOOST_CONCEPT_ASSERT((boost::Convertible<T *, State *>));
Definition of a compound state.
const State * operator[](unsigned int i) const
Access const element ith component. This does not check whether the index is within bounds.
State * operator[](unsigned int i)
Access element ith component. This does not check whether the index is within bounds.
const T * as(unsigned int index) const
Cast a component of this instance to a desired type.
T * as(const unsigned int index)
Cast a component of this instance to a desired type.
State ** components
The components that make up a compound state.
Definition of an abstract state.
const T * as() const
Cast this instance to a desired type.
T * as()
Cast this instance to a desired type.
Main namespace. Contains everything in this library.