Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <BehaviorSwitchControl.h>
Inheritance diagram for BehaviorSwitchControl< B, Al >:
Definition at line 75 of file BehaviorSwitchControl.h.
Public Member Functions | |
BehaviorSwitchControl (const std::string &n, bool retain=false) | |
constructor, can use this to toggle a single behavior on and off | |
BehaviorSwitchControl (const std::string &n, B *beh, BehaviorGroup *bg=NULL) | |
constructor, if you want to use an already constructed behavior, can pass NULL for behavior group | |
BehaviorSwitchControl (const std::string &n, BehaviorGroup *bg, bool retain=false) | |
constructor, needs to know what group its in and whether to retain its behavior | |
virtual | ~BehaviorSwitchControl () |
destructor | |
virtual BehaviorSwitchControl< B, Al > * | start () |
activates the behavior, handy for making start-up behaviors that you can turn off again with the Controller | |
virtual BehaviorSwitchControl< B, Al > * | stop () |
stops the behavior | |
virtual BehaviorSwitchControl< B, Al > * | toggle () |
toggles the behavior | |
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. | |
virtual bool | isValid () const |
Returns true if mybeh is pointing to a valid object. | |
Protected Attributes | |
B * | mybeh |
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 | |
BehaviorSwitchControl (const BehaviorSwitchControl &) | |
shouldn't call this | |
BehaviorSwitchControl | operator= (const BehaviorSwitchControl &) |
shouldn't call this |
|
constructor, can use this to toggle a single behavior on and off
Definition at line 78 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::mybeh. |
|
constructor, if you want to use an already constructed behavior, can pass NULL for behavior group
Definition at line 81 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::mybeh, and BehaviorSwitchControlBase::retained. |
|
constructor, needs to know what group its in and whether to retain its behavior
Definition at line 88 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::mybeh. |
|
destructor
Definition at line 92 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::mybeh, BehaviorSwitchControlBase::retained, and BehaviorSwitchControl< B, Al >::stop(). |
|
shouldn't call this
|
|
returns a short description of what the control does
Reimplemented from ControlBase. Definition at line 111 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::isValid(), and BehaviorSwitchControl< B, Al >::mybeh. |
|
adds a status to the name: - if in memory, # if running
Reimplemented from ControlBase. Definition at line 105 of file BehaviorSwitchControl.h. References ControlBase::getName(), BehaviorSwitchControl< B, Al >::isValid(), and BehaviorSwitchControl< B, Al >::mybeh. |
|
Returns true if the associated behavior is running.
Definition at line 156 of file BehaviorSwitchControl.h. References BehaviorSwitchControlBase::behgrp, and BehaviorSwitchControl< B, Al >::mybeh. |
|
Returns true if mybeh is pointing to a valid object.
Definition at line 167 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::isRunning(), and BehaviorSwitchControlBase::retained. |
|
shouldn't call this
|
|
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 Implements BehaviorSwitchControlBase. Definition at line 98 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::isRunning(), BehaviorSwitchControl< B, Al >::startmine(), and BehaviorSwitchControl< B, Al >::stopother(). |
|
Starts our behavior.
Definition at line 139 of file BehaviorSwitchControl.h. References BehaviorSwitchControlBase::behgrp, BehaviorSwitchControl< B, Al >::mybeh, and BehaviorSwitchControlBase::retained. |
|
stops the behavior
Implements BehaviorSwitchControlBase. Definition at line 100 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::isRunning(), and BehaviorSwitchControl< B, Al >::stopother(). |
|
Stops the "other" guy's behavior - if ::behgrp is NULL, stops ourselves.
Definition at line 122 of file BehaviorSwitchControl.h. References ASSERT, BehaviorSwitchControlBase::behgrp, BehaviorSwitchControl< B, Al >::mybeh, and BehaviorSwitchControlBase::retained. |
|
toggles the behavior
Implements BehaviorSwitchControlBase. Definition at line 102 of file BehaviorSwitchControl.h. References BehaviorSwitchControl< B, Al >::isRunning(), BehaviorSwitchControl< B, Al >::startmine(), and BehaviorSwitchControl< B, Al >::stopother(). |
|
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 173 of file BehaviorSwitchControl.h. |
Tekkotsu v1.4 |
Generated Sat Jul 19 00:08:51 2003 by Doxygen 1.3.2 |