Main Page   Class Hierarchy   Compound List   Compound Members  

ArActionGroup Class Reference

Class for groups of actions to accomplish one thing. More...

#include <ArActionGroup.h>

Inheritance diagram for ArActionGroup::

ArActionGroupInput ArActionGroupStop ArActionGroupTeleop ArActionGroupWander List of all members.

Public Methods

 ArActionGroup (ArRobot *robot)
 Constructor. More...

virtual ~ArActionGroup (void)
 Destructor, it also deletes the actions in its group.

virtual void addAction (ArAction *action, int priority)
 Adds the action to the robot this group uses with the given priority. More...

virtual void remAction (ArAction *action)
 Removes the action from the robot this group uses. More...

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 deactivate (void)
 Deactivates all the actions in this group.

virtual void removeActions (void)
 Removes all the actions in this group from the robot.

virtual std::list< ArAction *> * getActionList (void)
 Gets the action list (use this to delete actions after doing removeActions).


Detailed Description

Class for groups of actions to accomplish one thing.

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


Constructor & Destructor Documentation

ArActionGroup::ArActionGroup ArRobot   robot
 

Constructor.

@param robot The robot that this action group is attached to

@param deleteActionsOnDestruction if this is true then when the destructor is called the actions that this group has will be deleted


Member Function Documentation

void ArActionGroup::addAction ArAction   action,
int    priority
[virtual]
 

Adds the action to the robot this group uses with the given priority.

@param action the action to add to the robot @param priority the priority to give the action @see ArRobot::addAction

void ArActionGroup::remAction ArAction   action [virtual]
 

Removes the action from the robot this group uses.

@param action the action to remove from the robot @see ArRobot::remAction


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:43:46 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001