Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

ArActionGroup Class Reference

#include <ArActionGroup.h>

Inheritance diagram for ArActionGroup:

ArActionGroupColorFollow ArActionGroupInput ArActionGroupRatioDrive ArActionGroupRatioDriveUnsafe ArActionGroupStop ArActionGroupTeleop ArActionGroupUnguardedTeleop ArActionGroupWander List of all members.

Detailed Description

Group a set of ArAction objects together.

This class is used to collect a group of related ArActions together, and easily turn them on and off in aggregate. The group list may also be retrieved for performing any other operation you wish (e.g. to delete or get information about them.)

See also:
Actions overview

ArAction

actionGroupExample::cpp

Examples:

actionGroupExample.cpp.


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 an action to this group's robot, and associates the action with this group.
 ArActionGroup (ArRobot *robot)
 Constructor.
virtual void deactivate (void)
 Deactivates all the actions in this group.
virtual void deleteActions (void)
 Delets all the actions in this group (doesn't delete them right now).
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 this group's robot and dissasociates it from this group.
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
ArRobotmyRobot


Constructor & Destructor Documentation

ArActionGroup::ArActionGroup ArRobot robot  ) 
 

Constructor.

Parameters:
robot The robot that this action group is attached to. New actions added to this group (using addAction()) will be added to this robot object for evaluation in its action resolution task.


Member Function Documentation

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

Adds an action to this group's robot, and associates the action with this group.

The given action will be included in this group, and then added to this group's robot (specified in the constructor) by using ArRobot::addAction().

Parameters:
action the action to add to the robot and to this group
priority the priority to give the action; same meaning as in ArRobot::addAction
See also:
ArRobot::addAction
Examples:
actionGroupExample.cpp.

void ArActionGroup::remAction ArAction action  )  [virtual]
 

Removes the action from this group's robot and dissasociates it from this group.

Parameters:
action the action to remove from the robot
See also:
ArRobot::remAction


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 10:34:40 2010 for Aria by  doxygen 1.4.2