Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <BehaviorBase.h>
Inheritance diagram for BehaviorBase:
Makes use of ReferenceCounter so that behaviors can automatically delete themselves if wanted
Make sure your own DoStart and DoStop call BehaviorBase::DoStart (or Stop) to allow this behavior... otherwise you'll get memory leaks
Definition at line 12 of file BehaviorBase.h.
Public Member Functions | |
BehaviorBase () | |
constructor | |
virtual | ~BehaviorBase () |
destructor - if is active when deleted, will call DoStop() first | |
virtual void | DoStart () |
By default, merely adds to the reference counter (through AddReference())
| |
virtual void | DoStop () |
By default, subtracts from the reference counter, and deletes if zero
| |
virtual void | processEvent (const EventBase &) |
Allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing. | |
virtual std::string | getName () const=0 |
Identifies the behavior in menus and such. | |
virtual std::string | getDescription () const |
Gives a short description of what this particular instantiation does (in case a more specific description is needed). | |
virtual bool | isActive () const |
Returns true if the behavior is currently running. | |
Static Public Member Functions | |
std::string | getClassDescription () |
Gives a short description of what this class of behaviors does... you should override this (but don't have to). | |
Protected Attributes | |
bool | started |
true when the behavior is active |
|
constructor
Definition at line 15 of file BehaviorBase.h. References started. |
|
destructor - if is active when deleted, will call DoStop() first
Definition at line 17 of file BehaviorBase.h. References DoStop(), ReferenceCounter::SetAutoDelete(), and started. |
|
By default, merely adds to the reference counter (through AddReference())
Reimplemented in Controller, FreeMemReportControl, Aibo3DControllerBehavior, AutoGetupBehavior, BanditMachine, BanditMachine::PressNode, BanditMachine::DecideNode, BanditMachine::WaitNode, BatteryMonitorBehavior, CameraBehavior, ChaseBallBehavior, DriveMeBehavior, DumbWM2Behavior, EStopControllerBehavior, EvtRptBehavior, FollowHeadBehavior, HeadLevelBehavior, HeadPointControllerBehavior, SimpleChaseBallBehavior, SoundTestBehavior, StareAtBallBehavior, ToggleHeadLightBehavior, WalkControllerBehavior, WalkToTargetMachine, WorldModel2Behavior, WorldModel2Behavior::WalkNode, WorldModel2Behavior::GawkNode, WorldModel2Behavior::WaitNode, OutputNode, StateNode, and StartupBehavior. Definition at line 19 of file BehaviorBase.h. References ReferenceCounter::AddReference(), and started. |
|
By default, subtracts from the reference counter, and deletes if zero
Reimplemented in Controller, FreeMemReportControl, Aibo3DControllerBehavior, AutoGetupBehavior, BanditMachine, BanditMachine::PressNode, BanditMachine::WaitNode, BatteryMonitorBehavior, CameraBehavior, ChaseBallBehavior, DriveMeBehavior, DumbWM2Behavior, EStopControllerBehavior, EvtRptBehavior, FollowHeadBehavior, HeadLevelBehavior, HeadPointControllerBehavior, SimpleChaseBallBehavior, SoundTestBehavior, StareAtBallBehavior, ToggleHeadLightBehavior, WalkControllerBehavior, WalkToTargetMachine, WorldModel2Behavior, WorldModel2Behavior::WalkNode, WorldModel2Behavior::GawkNode, WorldModel2Behavior::WaitNode, StateNode, and StartupBehavior. Definition at line 21 of file BehaviorBase.h. References ReferenceCounter::RemoveReference(), and started. |
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented in Controller, Aibo3DControllerBehavior, Aibo3DMonitorBehavior, AutoGetupBehavior, BanditMachine, BatteryMonitorBehavior, CameraBehavior, ChaseBallBehavior, DriveMeBehavior, DumbWM2Behavior, EStopControllerBehavior, EvtRptBehavior, FollowHeadBehavior, HeadLevelBehavior, HeadPointControllerBehavior, SoundTestBehavior, StareAtBallBehavior, ToggleHeadLightBehavior, WalkControllerBehavior, WalkToTargetMachine, WorldModel2Behavior, and StartupBehavior. Definition at line 30 of file BehaviorBase.h. |
|
Gives a short description of what this particular instantiation does (in case a more specific description is needed).
Reimplemented in StateNode. Definition at line 33 of file BehaviorBase.h. References getClassDescription(). |
|
Identifies the behavior in menus and such.
Implemented in Controller, FreeMemReportControl, Aibo3DControllerBehavior, Aibo3DMonitorBehavior, AutoGetupBehavior, BatteryMonitorBehavior, CameraBehavior, ChaseBallBehavior, DriveMeBehavior, DumbWM2Behavior, EStopControllerBehavior, EvtRptBehavior, FollowHeadBehavior, HeadLevelBehavior, HeadPointControllerBehavior, SimpleChaseBallBehavior, SoundTestBehavior, StareAtBallBehavior, ToggleHeadLightBehavior, WalkControllerBehavior, StateNode, and StartupBehavior. |
|
Returns true if the behavior is currently running.
Definition at line 36 of file BehaviorBase.h. References started. |
|
Allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.
Implements EventListener. Reimplemented in Controller, FreeMemReportControl, AutoGetupBehavior, BanditMachine::WaitNode, BatteryMonitorBehavior, CameraBehavior, ChaseBallBehavior, DriveMeBehavior, DumbWM2Behavior, EStopControllerBehavior, EvtRptBehavior, FollowHeadBehavior, HeadLevelBehavior, HeadPointControllerBehavior, SimpleChaseBallBehavior, SoundTestBehavior, StareAtBallBehavior, WalkControllerBehavior, WalkToTargetMachine, WorldModel2Behavior::WalkNode, WorldModel2Behavior::GawkNode, StateNode, and StartupBehavior. Definition at line 23 of file BehaviorBase.h. |
|
true when the behavior is active
Definition at line 39 of file BehaviorBase.h. |
Tekkotsu v1.4 |
Generated Sat Jul 19 00:08:50 2003 by Doxygen 1.3.2 |