/*

ARIA header files for use with ARNL 1.7.1

Copyright(C) 2004, 2005 ActivMedia Robotics, LLC. 
Copyright(C) 2006, 2007, 2008, 2009 MobileRobots Inc.
All rights reserved.

This copy of Aria was relicensed for use with Arnl and the Arnl
license by MobileRobots Inc.  If you wish to download a seperate
distribution of Aria licensed under the GPL or a commercial license go to
http://www.mobilerobots.com/SOFTWARE/aria.html or contact MobileRobots
Inc, at robots@mobilerobots.com or MobileRobots Inc,
10 Columbia Drive, Amherst, NH 03031; 800-639-9481

MobileRobots Inc hereby grants to other individuals or
organizations permission to use this software with Arnl and in
compliance with the Arnl license.  This software may not be
distributed to others except by MobileRobots Inc.

MobileRobots Inc does not make any representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.

*/
#ifndef ARACTIONGROUP_H
#define ARACTIONGROUP_H

#include "ariaTypedefs.h"

#include <list>

class ArRobot;
class ArAction;

/// 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 @ref actions overview
   @see ArAction
   @see @ref actionGroupExample.cpp
**/
class ArActionGroup
{
public:
  /// Constructor
  AREXPORT ArActionGroup(ArRobot * robot);
  /// Destructor, it also deletes the actions in its group
  AREXPORT virtual ~ArActionGroup();
  /// Adds an action to this group's robot, and associates the action with this group.
  AREXPORT virtual void addAction(ArAction *action, int priority);
  /// Removes the action from this group's robot and dissasociates it from this group.
  AREXPORT virtual void remAction(ArAction *action);
  /// Activates all the actions in this group
  AREXPORT virtual void activate(void);
  /// Activates all the actions in this group and deactivates all others
  AREXPORT virtual void activateExclusive(void);
  /// Deactivates all the actions in this group
  AREXPORT virtual void deactivate(void);
  /// Removes all the actions in this group from the robot
  AREXPORT virtual void removeActions(void);
  /// Delets all the actions in this group (doesn't delete them right now)
  AREXPORT virtual void deleteActions(void);
  /// Gets the action list (use this to delete actions after doing removeActions)
  AREXPORT virtual std::list<ArAction *> *getActionList(void);
protected:
  std::list<ArAction *> myActions;
  ArRobot *myRobot;
};

#endif // ARACTIONGROUP_H
