#include <ArActionGroup.h>
Inheritance diagram for ArActionGroup:
Public Member Functions | |
virtual void | activate (void) |
Activates all the actions in this group. | |
virtual void | activateExclusive (void) |
Activates all the actions in this group and deactivates all others. | |
virtual void | addAction (ArAction *action, int priority) |
Adds the action to the robot this group uses with the given priority. | |
ArActionGroup (ArRobot *robot) | |
Constructor. | |
virtual void | deactivate (void) |
Deactivates all the actions in this group. | |
virtual std::list< ArAction * > * | getActionList (void) |
Gets the action list (use this to delete actions after doing removeActions). | |
virtual void | remAction (ArAction *action) |
Removes the action from the robot this group uses. | |
virtual void | removeActions (void) |
Removes all the actions in this group from the robot. | |
virtual | ~ArActionGroup () |
Destructor, it also deletes the actions in its group. | |
Protected Attributes | |
std::list< ArAction * > | myActions |
ArRobot * | myRobot |
This class is used to have a group of ArActions and turn them on and off in aggregate... this is so that you can say have a group of like 5 behaviors for teleop or wander, and just turn 'em all on and off at once. Note that the destructor by default will delete the actions added to the group, this is controlled with a flag to the constructor though, so you can have it how you want.... this is nice though so you can just do addAction(new ArActionWhatever(blah, blah, blah), 90); and not worry about the deletion (since the destructor will do it), just delete the group... if for some reason (I'd advise against it) you are using one action in multiple groups, don't use this feature, ie pass in false to the constructor for it or you'll wind up with a crash when the action is deleted by both groups (again, you should probably only have an action in one group).
Definition at line 54 of file ArActionGroup.h.
|
Constructor.
Definition at line 42 of file ArActionGroup.cpp. |
|
Adds the action to the robot this group uses with the given priority.
Definition at line 58 of file ArActionGroup.cpp. References ArRobot::addAction(), and ArLog::log(). |
|
Removes the action from the robot this group uses.
Definition at line 74 of file ArActionGroup.cpp. References ArLog::log(), and ArRobot::remAction(). |