Aria  2.8.0
ArActionGroup Class Reference

Group a set of ArAction objects together. More...

#include <ArActionGroup.h>

Inherited by ArActionGroupColorFollow, ArActionGroupInput, ArActionGroupRatioDrive, ArActionGroupRatioDriveUnsafe, ArActionGroupStop, ArActionGroupTeleop, ArActionGroupUnguardedTeleop, and ArActionGroupWander.

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. More...
 
 ArActionGroup (ArRobot *robot)
 Constructor. More...
 
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. More...
 
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
 

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.

Constructor & Destructor Documentation

◆ ArActionGroup()

ArActionGroup::ArActionGroup ( ArRobot robot)

Constructor.

Parameters
robotThe 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

◆ addAction()

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
actionthe action to add to the robot and to this group
prioritythe priority to give the action; same meaning as in ArRobot::addAction
See also
ArRobot::addAction
Examples:
actionGroupExample.cpp.

◆ remAction()

void ArActionGroup::remAction ( ArAction action)
virtual

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

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

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