| 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 | |
| BehaviorBase (const BehaviorBase &b) | |
| copy constructor; assumes subclass handles copying approriately - i.e. if b is active, the copy will be as well, even though DoStart was never called.. | |
| BehaviorBase & | operator= (const BehaviorBase &b) |
| assignment operator; assumes subclass handles assignment appropriately - i.e. if b is active, the copy will be as well, even though DoStart was never called.. | |
| 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()) you should still call this from your overriding methods. | |
| virtual void | DoStop () |
By default, subtracts from the reference counter, and deletes if zero you should still call this when you override this call this at the end of your DoStop(), not beginning (it might delete this ). | |
| virtual void | processEvent (const EventBase &) |
| By defining here, 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. |
|
|
copy constructor; assumes subclass handles copying approriately - i.e. if b is active, the copy will be as well, even though DoStart was never called..
Definition at line 17 of file BehaviorBase.h. References started. |
|
|
destructor - if is active when deleted, will call DoStop() first
Definition at line 22 of file BehaviorBase.h. References DoStop(), ReferenceCounter::SetAutoDelete(), and started. |
Here is the call graph for this function:

|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented in Controller, AlanBehavior, AutoGetupBehavior, BanditMachine, BatteryMonitorBehavior, CameraBehavior, ChaseBallBehavior, CrashTestBehavior, DriveMeBehavior, DumbWM2Behavior, EvtRptBehavior, FollowHeadBehavior, HeadLevelBehavior, HelloWorldBehavior, SoundTestBehavior, StareAtBallBehavior, ToggleHeadLightBehavior, WalkToTargetMachine, WorldModel2Behavior, Aibo3DControllerBehavior, EStopControllerBehavior, HeadPointControllerBehavior, ViewWMVarsBehavior, WalkControllerBehavior, WMMonitorBehavior, and StartupBehavior. Definition at line 54 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 57 of file BehaviorBase.h. References getClassDescription(). |
Here is the call graph for this function:

|
|
|
Returns true if the behavior is currently running.
Definition at line 60 of file BehaviorBase.h. References started. |
|
|
assignment operator; assumes subclass handles assignment appropriately - i.e. if b is active, the copy will be as well, even though DoStart was never called..
Definition at line 19 of file BehaviorBase.h. References ReferenceCounter::operator=(), and started. |
Here is the call graph for this function:

|
|
By defining here, 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, AlanBehavior, AutoGetupBehavior, BanditMachine::WaitNode, BatteryMonitorBehavior, CameraBehavior, ChaseBallBehavior, DriveMeBehavior, DumbWM2Behavior, EvtRptBehavior, ExploreMachine, FollowHeadBehavior, HeadLevelBehavior, SimpleChaseBallBehavior, SoundTestBehavior, StareAtBallBehavior, WalkToTargetMachine, WorldModel2Behavior::WalkNode, WorldModel2Behavior::GawkNode, EStopControllerBehavior, HeadPointControllerBehavior, WalkControllerBehavior, WMMonitorBehavior, CompareTrans< T >, SmoothCompareTrans< T >, TimeOutTrans, VisualTargetCloseTrans, VisualTargetTrans, and StartupBehavior. Definition at line 48 of file BehaviorBase.h. |
|
|
true when the behavior is active
Definition at line 63 of file BehaviorBase.h. |
|
Tekkotsu v1.5 |
Generated Fri Oct 10 15:55:11 2003 by Doxygen 1.3.4 |