|  | RobWorkProject
    23.9.11-
    | 
Implements a template based and generic version of a task. More...
#include <Task.hpp>
Inherits TaskBase.
| Public Types | |
| typedef rw::core::Ptr< TASK > | TaskPtr | 
| typedef rw::core::Ptr< TARGET > | TargetPtr | 
| typedef rw::core::Ptr< MOTION > | MotionPtr | 
|  Public Types inherited from TaskBase | |
| typedef rw::core::Ptr< TaskBase > | Ptr | 
| smart pointer type to this class | |
| typedef rw::core::Ptr< Action > | ActionPtr | 
|  Public Types inherited from Entity | |
| typedef rw::core::Ptr< Entity > | Ptr | 
| smart pointer type to this class | |
| Public Member Functions | |
| GenericTask (Type type=-1, const std::string &id="") | |
| Constrcts Task.  More... | |
| virtual | ~GenericTask () | 
| Destructor. | |
| void | addTarget (TargetPtr target) | 
| Adds target to the task.  More... | |
| void | addTargetToFront (TargetPtr target) | 
| bool | removeTarget (TargetPtr target) | 
| Removes a specific target. | |
| std::vector< TargetPtr > & | getTargets () | 
| Returns list of targets.  More... | |
| const std::vector< TargetPtr > & | getTargets () const | 
| Returns list of targets.  More... | |
| void | addMotion (MotionPtr motion) | 
| Adds motion to the task.  More... | |
| void | addMotionToFront (MotionPtr motion) | 
| Adds motion to the front of the task.  More... | |
| bool | removeMotion (MotionPtr motion) | 
| Removes a specific motion. | |
| std::vector< MotionPtr > & | getMotions () | 
| Returns list of motions.  More... | |
| const std::vector< MotionPtr > & | getMotions () const | 
| Returns list of motions.  More... | |
| void | addTask (TaskPtr task) | 
| Adds task as a subtask.  More... | |
| void | addTaskToFront (TaskPtr task) | 
| std::vector< TaskPtr > & | getTasks () | 
| Returns list of tasks.  More... | |
| const std::vector< TaskPtr > & | getTasks () const | 
| Returns list of tasks.  More... | |
| void | reverse () | 
| Reverse the order of the task. | |
|  Public Member Functions inherited from TaskBase | |
| TaskBase (Type type, const std::string &id="") | |
| Constructs a task with a given type.  More... | |
| virtual | ~TaskBase () | 
| Destructor. | |
| Type | type () const | 
| Returns the type of the task. | |
| void | addAugmentation (TaskBase::Ptr task, const std::string &id) | 
| Add an augmentation of the task.  More... | |
| bool | hasAugmentation (const std::string &id) | 
| Returns whether the task has an augmentation with a given id.  More... | |
| TaskBase::Ptr | getAugmentation (const std::string &id) | 
| Returns augmentation associated to id.  More... | |
| std::map< std::string, TaskBase::Ptr > & | getAugmentations () | 
| Returns map with ids and augmentations.  More... | |
| const std::map< std::string, TaskBase::Ptr > & | getAugmentations () const | 
| Returns map with ids and augmentations.  More... | |
| void | addEntity (rw::core::Ptr< Entity > entity) | 
| Adds entity to the task.  More... | |
| void | addEntityToFront (rw::core::Ptr< Entity > entity) | 
| std::vector< rw::core::Ptr< Entity > > & | getEntities () | 
| Returns list of entities.  More... | |
| const std::vector< rw::core::Ptr< Entity > > & | getEntities () const | 
| Returns list of entities.  More... | |
| void | addAction (ActionPtr action) | 
| Adds action to the task.  More... | |
| void | addActionToFront (ActionPtr action) | 
| std::vector< ActionPtr > & | getActions () | 
| Returns list of actions.  More... | |
| const std::vector< ActionPtr > & | getActions () const | 
| Returns list of actions.  More... | |
| void | setDeviceName (const std::string &name) | 
| Sets name of device associated to the task.  More... | |
| const std::string & | getDeviceName () const | 
| Returns name of device associated to the task.  More... | |
| bool | removeAction (Action::Ptr action) | 
| Removes a specific action. | |
|  Public Member Functions inherited from Entity | |
| Entity (EntityType type, const std::string &id="") | |
| Constructs an Entity with a given type,.  More... | |
| virtual | ~Entity () | 
| Destructor. | |
| rw::core::PropertyMap & | getPropertyMap () | 
| Returns reference to rw::core::PropertyMap associated with the Entity.  More... | |
| const rw::core::PropertyMap & | getPropertyMap () const | 
| Returns reference to rw::core::PropertyMap associated with the Entity.  More... | |
| void | setPropertyMap (const rw::core::PropertyMap &propertymap) | 
| Sets the content of the propertymap.  More... | |
| int | getIndex () const | 
| Returns index specifying the position of the Entity in a Task.  More... | |
| void | setIndex (int index) | 
| Sets the order index of the Entity.  More... | |
| virtual EntityType | entityType () const | 
| Returns the type of Entity.  More... | |
| void | setId (const std::string &id) | 
| Set the id for the entity.  More... | |
| const std::string & | getId () const | 
| Get the id of the entity.  More... | |
| template<class T > | |
| T | cast () | 
| Method which can be used to explicitly and safely casting an Entity.  More... | |
| Protected Attributes | |
| std::vector< TargetPtr > | _targets | 
| std::vector< MotionPtr > | _motions | 
| std::vector< TaskPtr > | _tasks | 
|  Protected Attributes inherited from TaskBase | |
| Type | _type | 
| std::map< std::string, TaskBase::Ptr > | _augmentations | 
| std::vector< ActionPtr > | _actions | 
| std::vector< rw::core::Ptr< Entity > > | _entities | 
| std::string | _deviceName | 
|  Protected Attributes inherited from Entity | |
| rw::core::PropertyMap | _properties | 
| Properties of entity. | |
| EntityType | _entityType | 
| The type of entity. | |
| int | _index | 
| The index of the entity. | |
| std::string | _id | 
| The id of the entity. | |
| Additional Inherited Members | |
|  Protected Member Functions inherited from TaskBase | |
| void | doReverseBase () | 
| void | copyBase (TaskBase::Ptr target) | 
| virtual TaskBase::Ptr | doClone () | 
| bool | removeEntity (Entity::Ptr entity) | 
Implements a template based and generic version of a task.
The template arguments TASK, TARGET and MOTION represents specifies which kind of task, target and motion to use.
| typedef rw::core::Ptr<MOTION> MotionPtr | 
Convenience definition of pointer to motion
| typedef rw::core::Ptr<TARGET> TargetPtr | 
Convenience definition of pointer to target
| typedef rw::core::Ptr<TASK> TaskPtr | 
Convenience definition of pointer to task
| 
 | inline | 
Constrcts Task.
When constructing a task the type T is automatically added to the TypeRepository and the the associated value is set as the type.
| 
 | inline | 
Adds motion to the task.
| motion | [in] Motion to add | 
| 
 | inline | 
Adds motion to the front of the task.
| motion | [in] Motion to add | 
| 
 | inline | 
Adds target to the task.
| target | [in] Target to add | 
| 
 | inline | 
Returns list of motions.
| 
 | inline | 
Returns list of motions.
| 
 | inline | 
Returns list of targets.
| 
 | inline | 
Returns list of targets.
| 
 | inline | 
Returns list of tasks.
| 
 | inline | 
Returns list of tasks.