A navigation task that consists of one or multiple sub tasks.
More...
#include <navigation/Task.h>
|
| template<typename Reflector > |
| void | reflect (Reflector &r) |
| | The reflect method. More...
|
| |
| void | addSubTask (SubTaskPtr task) |
| | Add a subtask to this task. More...
|
| |
| template<class T > |
| boost::shared_ptr< T > | getSubTask (bool allowDerived=true) |
| | Get a subtask of type T. More...
|
| |
| template<class T > |
| boost::shared_ptr< const T > | getSubTask (bool allowDerived=true) const |
| | Get a subtask of type T. More...
|
| |
A navigation task that consists of one or multiple sub tasks.
◆ reflect()
| void reflect |
( |
Reflector & |
r | ) |
|
|
inline |
◆ addSubTask()
Add a subtask to this task.
In principle multiple subtasks of the same type are allowed. Normally getSubTask is used to retrieve a subtask of a certain type. getSubTask returns the first item in the list that matches the requested type. In this case all other subtasks of the same type will be ignored.
- Parameters
-
◆ getSubTask() [1/2]
| boost::shared_ptr<T> getSubTask |
( |
bool |
allowDerived = true | ) |
|
|
inline |
Get a subtask of type T.
- Parameters
-
| allowDerived | Specifies whether the method should also return tasks that are derived from T (see below). |
- Returns
- pointer to subtask or null pointer if no subtask of type T exists
- Note
- To understand the allowDerived parameter, imagine the following example: Let Foo and Bar be two task classes, where Bar is derived from Foo.
getSubTask<Foo>(true) now also returns sub tasks of the type Bar, while getSubTask<Foo>(false) won't. getSubTask<Foo>(false) will only return sub tasks of the type Foo and not of derived classes.
◆ getSubTask() [2/2]
| boost::shared_ptr<const T> getSubTask |
( |
bool |
allowDerived = true | ) |
const |
|
inline |
Get a subtask of type T.
- Parameters
-
| allowDerived | Specifies whether the method should also return tasks that are derived from T (see below). |
- Returns
- pointer to subtask or null pointer if no subtask of type T exists
- Note
- To understand the allowDerived parameter, imagine the following example: Let Foo and Bar be two task classes, where Bar is derived from Foo.
getSubTask<Foo>(true) now also returns sub tasks of the type Bar, while getSubTask<Foo>(false) won't. getSubTask<Foo>(false) will only return sub tasks of the type Foo and not of derived classes.
◆ subTasks
The documentation for this class was generated from the following file: