RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
Action Class Reference

Specification of an action in a task. More...

#include <Action.hpp>

Inherits Entity.

Public Types

typedef rw::core::Ptr< ActionPtr
 smart pointer type to this class
 
- Public Types inherited from Entity
typedef rw::core::Ptr< EntityPtr
 smart pointer type to this class
 

Public Member Functions

 Action (ActionType actionType)
 Construct an Action with a given type. More...
 
virtual ~Action ()
 Destructor.
 
ActionType actionType () const
 Returns the type of the action.
 
virtual rw::core::Ptr< Actionclone ()
 Make a copy of the action. More...
 
- 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::PropertyMapgetPropertyMap ()
 Returns reference to rw::core::PropertyMap associated with the Entity. More...
 
const rw::core::PropertyMapgetPropertyMap () 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 >
cast ()
 Method which can be used to explicitly and safely casting an Entity. More...
 

Additional Inherited Members

- 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.
 

Detailed Description

Specification of an action in a task.

An Action in a task can be used to specify e.g. when to turn a tool on/off. The default action only contains a simple type and a rw::core::PropertyMap, which can be used to store value associated with the event. It is the responsibility of the user to interpret an Action and do what is necessary.

Constructor & Destructor Documentation

◆ Action()

Action ( ActionType  actionType)
inline

Construct an Action with a given type.

Parameters
actionType[in] Type of the action

Member Function Documentation

◆ clone()

virtual rw::core::Ptr<Action> clone ( )
inlinevirtual

Make a copy of the action.

Returns
new identical action.

The documentation for this class was generated from the following file: