53 #include <serialization/adapters/boost/shared_ptr.hpp> 54 #include <serialization/adapters/std/list> 56 namespace mira {
namespace navigation {
71 template<
typename Reflector>
74 r.itemName(this->
getClass().getName());
90 template<
typename Reflector>
93 r.property(
"SubTasks",
subTasks,
"Sub tasks");
128 auto r = boost::dynamic_pointer_cast<T>(task);
129 if ( r != 0 && (allowDerived ||
typeid(*r) ==
typeid(T)))
132 return boost::shared_ptr<T>();
150 boost::shared_ptr<const T>
getSubTask(
bool allowDerived=
true)
const 154 auto r = boost::dynamic_pointer_cast<
const T>(task);
155 if ( r != 0 && (allowDerived ||
typeid(*r) ==
typeid(T)))
158 return boost::shared_ptr<const T>();
virtual ~SubTask()
The destructor.
Definition: Task.h:68
void reflect(Reflector &r)
The reflect method.
Definition: Task.h:72
boost::shared_ptr< Task > TaskPtr
pointer to task
Definition: Task.h:168
boost::shared_ptr< T > getSubTask(bool allowDerived=true)
Get a subtask of type T.
Definition: Task.h:124
void addSubTask(SubTaskPtr task)
Add a subtask to this task.
Definition: Task.h:105
std::list< SubTaskPtr > subTasks
list of subtasks
Definition: Task.h:164
#define MIRA_OBJECT(classIdentifier)
Class const & getClass() const
boost::shared_ptr< const T > getSubTask(bool allowDerived=true) const
Get a subtask of type T.
Definition: Task.h:150
Interface for sub tasks to be added to a navigation task.
Definition: Task.h:63
A navigation task that consists of one or multiple sub tasks.
Definition: Task.h:86
boost::shared_ptr< SubTask > SubTaskPtr
A subtask pointer.
Definition: Task.h:79
void reflect(Reflector &r)
The reflect method.
Definition: Task.h:91