Homepage Demos Overview Downloads Tutorials Reference
Credits

BehaviorSwitchControlBase Class Reference

#include <BehaviorSwitchControl.h>

Inheritance diagram for BehaviorSwitchControlBase:

Inheritance graph
[legend]
List of all members.

Detailed Description

Holds some utility classes and functions for BehaviorSwitchControl which shouldn't be stored in a templated class.

Definition at line 12 of file BehaviorSwitchControl.h.

Public Member Functions

 BehaviorSwitchControlBase (const std::string &n, BehaviorBase *beh, BehaviorGroup *bg=NULL)
 constructor
 BehaviorSwitchControlBase (BehaviorBase *beh, BehaviorGroup *bg=NULL)
 constructor
virtual ~BehaviorSwitchControlBase ()
 destructor
virtual BehaviorSwitchControlBasestart ()
 activates the behavior, handy for making start-up behaviors that you can turn off again with the Controller
virtual BehaviorSwitchControlBasestop ()
 stops the behavior
virtual BehaviorSwitchControlBasetoggle ()
 toggles the behavior
virtual ControlBaseactivate (MotionManager::MC_ID display, Socket *gui)
 tells the current behavior (if there is one) to stop then loads its own
virtual std::string getName () const
 adds a status to the name: - if in memory, # if running
virtual std::string getDescription () const
 returns a short description of what the control does

Protected Member Functions

virtual void stopother ()
 Stops the "other" guy's behavior - if ::behgrp is NULL, stops ourselves.
virtual void startmine ()
 Starts our behavior.
virtual bool isRunning () const
 Returns true if the associated behavior is running.

Protected Attributes

BehaviorGroupbehgrp
 the behavior group this belongs to. Uses this to track the "current" behavior
BehaviorBasemybeh
 used to store the behavior. If retained and non-NULL, will be valid. However, if not retained, only valid if equals behgrp->curBehavior

Private Member Functions

 BehaviorSwitchControlBase (const BehaviorSwitchControlBase &)
 shouldn't copy these
BehaviorSwitchControlBase operator= (const BehaviorSwitchControlBase &)
 shouldn't assign these


Constructor & Destructor Documentation

BehaviorSwitchControlBase::BehaviorSwitchControlBase const std::string &  n,
BehaviorBase beh,
BehaviorGroup bg = NULL
[inline]
 

constructor

Definition at line 32 of file BehaviorSwitchControl.h.

BehaviorSwitchControlBase::BehaviorSwitchControlBase BehaviorBase beh,
BehaviorGroup bg = NULL
[inline]
 

constructor

Definition at line 40 of file BehaviorSwitchControl.h.

virtual BehaviorSwitchControlBase::~BehaviorSwitchControlBase  )  [inline, virtual]
 

destructor

Definition at line 48 of file BehaviorSwitchControl.h.

BehaviorSwitchControlBase::BehaviorSwitchControlBase const BehaviorSwitchControlBase  )  [private]
 

shouldn't copy these


Member Function Documentation

virtual ControlBase* BehaviorSwitchControlBase::activate MotionManager::MC_ID  display,
Socket gui
[inline, virtual]
 

tells the current behavior (if there is one) to stop then loads its own

Returns:
NULL unless there are submenus

Reimplemented from ControlBase.

Definition at line 72 of file BehaviorSwitchControl.h.

virtual std::string BehaviorSwitchControlBase::getDescription  )  const [inline, virtual]
 

returns a short description of what the control does

Reimplemented from ControlBase.

Reimplemented in BehaviorSwitchControl< B, Al >.

Definition at line 86 of file BehaviorSwitchControl.h.

Referenced by BehaviorSwitchControl< B, Al >::getDescription(), and BehaviorSwitchActivatorControl::getDescription().

virtual std::string BehaviorSwitchControlBase::getName  )  const [inline, virtual]
 

adds a status to the name: - if in memory, # if running

Reimplemented from ControlBase.

Reimplemented in BehaviorSwitchControl< B, Al >.

Definition at line 81 of file BehaviorSwitchControl.h.

Referenced by BehaviorSwitchControl< B, Al >::getName(), and BehaviorSwitchActivatorControl::getName().

virtual bool BehaviorSwitchControlBase::isRunning  )  const [inline, protected, virtual]
 

Returns true if the associated behavior is running.

Definition at line 112 of file BehaviorSwitchControl.h.

Referenced by BehaviorSwitchControl< B, Al >::isValid(), start(), stop(), and toggle().

BehaviorSwitchControlBase BehaviorSwitchControlBase::operator= const BehaviorSwitchControlBase  )  [private]
 

shouldn't assign these

virtual BehaviorSwitchControlBase* BehaviorSwitchControlBase::start  )  [inline, virtual]
 

activates the behavior, handy for making start-up behaviors that you can turn off again with the Controller

If you start twice without stopping (ie it's already running), shouldn't do anything

Definition at line 62 of file BehaviorSwitchControl.h.

Referenced by BehaviorSwitchActivatorControl::activate().

virtual void BehaviorSwitchControlBase::startmine  )  [inline, protected, virtual]
 

Starts our behavior.

Reimplemented in BehaviorSwitchControl< B, Al >.

Definition at line 105 of file BehaviorSwitchControl.h.

Referenced by start(), and toggle().

virtual BehaviorSwitchControlBase* BehaviorSwitchControlBase::stop  )  [inline, virtual]
 

stops the behavior

Definition at line 65 of file BehaviorSwitchControl.h.

Referenced by BehaviorSwitchActivatorControl::activate(), BehaviorSwitchControl< B, Al >::~BehaviorSwitchControl(), and ~BehaviorSwitchControlBase().

virtual void BehaviorSwitchControlBase::stopother  )  [inline, protected, virtual]
 

Stops the "other" guy's behavior - if ::behgrp is NULL, stops ourselves.

Reimplemented in BehaviorSwitchControl< B, Al >.

Definition at line 94 of file BehaviorSwitchControl.h.

Referenced by start(), stop(), and toggle().

virtual BehaviorSwitchControlBase* BehaviorSwitchControlBase::toggle  )  [inline, virtual]
 

toggles the behavior

Definition at line 68 of file BehaviorSwitchControl.h.

Referenced by activate(), and BehaviorSwitchActivatorControl::activate().


Member Data Documentation

BehaviorGroup* BehaviorSwitchControlBase::behgrp [protected]
 

the behavior group this belongs to. Uses this to track the "current" behavior

Definition at line 122 of file BehaviorSwitchControl.h.

Referenced by BehaviorSwitchControlBase(), isRunning(), startmine(), stopother(), and ~BehaviorSwitchControlBase().

BehaviorBase* BehaviorSwitchControlBase::mybeh [protected]
 

used to store the behavior. If retained and non-NULL, will be valid. However, if not retained, only valid if equals behgrp->curBehavior

Definition at line 123 of file BehaviorSwitchControl.h.

Referenced by BehaviorSwitchControlBase(), getDescription(), getName(), isRunning(), startmine(), stopother(), and ~BehaviorSwitchControlBase().


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

Tekkotsu v2.2
Generated Tue Oct 19 14:20:15 2004 by Doxygen 1.3.9.1