Base class of object inserted into a Task.
More...
#include <Entity.hpp>
Inherited by Action, MotionBase, TargetBase, and TaskBase.
Base class of object inserted into a Task.
◆ Entity()
Constructs an Entity with a given type,.
- Parameters
-
type | [in] Type of entity |
id | [in] Optional id of entity |
◆ cast()
Method which can be used to explicitly and safely casting an Entity.
If the cast in impossible the method may throws a rw::core::Exception or return NULL if casting to a pointer.
Example:
Action* action = myEntity->cast<Action*>();
◆ entityType()
◆ getId()
const std::string& getId |
( |
| ) |
const |
|
inline |
Get the id of the entity.
- Returns
- the id.
◆ getIndex()
Returns index specifying the position of the Entity in a Task.
The index may be used to determine when the order of Actions and Motions in a Task. It is the responsibility of the task to generate indices. This index does not necessarily refer to an index in a list of entities.
- Returns
- The index specifying the relative position of the Entity
◆ getPropertyMap() [1/2]
◆ getPropertyMap() [2/2]
◆ setId()
void setId |
( |
const std::string & |
id | ) |
|
|
inline |
Set the id for the entity.
- Parameters
-
◆ setIndex()
void setIndex |
( |
int |
index | ) |
|
|
inline |
Sets the order index of the Entity.
This method is primarily used by Task to specify the position of an Entity. Modifying the index does not influence where in a task it is located.
- Parameters
-
index | [in] The index specifying the order |
◆ setPropertyMap()
Sets the content of the propertymap.
Overrides the current propertymap with propertymap
- Parameters
-
propertymap | [in] The propertymap to use |
The documentation for this class was generated from the following file: