Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Aibo3DControllerBehavior Class Reference

#include <Aibo3DControllerBehavior.h>

Inheritance diagram for Aibo3DControllerBehavior:

List of all members.


Detailed Description

Listens to aibo3d control commands coming in from the command port.

Definition at line 21 of file Aibo3DControllerBehavior.h.


Public Member Functions

 Aibo3DControllerBehavior ()
 constructor
virtual ~Aibo3DControllerBehavior ()
 destructor
virtual void DoStart ()
 By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
virtual void DoStop ()
 By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).
virtual std::string getGUIType () const
 returns string corresponding to the Java GUI which should be launched
virtual unsigned int getPort () const
 returns port number the Java GUI should connect to
virtual std::string getDescription () const
 Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).

Static Public Member Functions

static std::string getClassDescription ()
 Gives a short description of what this class of behaviors does... you should override this (but don't have to).
static void setSerializerControl (BehaviorSwitchControlBase *ctrl)
 sets the BehaviorSwitchControlBase which should be used to activate the serialization of WorldState data for the Aibo3D client to read

Private Member Functions

 Aibo3DControllerBehavior (const Aibo3DControllerBehavior &)
 don't call
Aibo3DControllerBehavior operator= (const Aibo3DControllerBehavior &)

Private Attributes

bool launchedSerializer
 if true, indicates we launched the WorldState serializer, so we should stop it again if we stop

Static Private Attributes

static BehaviorSwitchControlBasestateSerializerControl = NULL
 so we can start the serializer behavior if it's not already running

Constructor & Destructor Documentation

Aibo3DControllerBehavior::Aibo3DControllerBehavior ( const Aibo3DControllerBehavior  )  [private]

don't call

Aibo3DControllerBehavior::Aibo3DControllerBehavior (  )  [inline]

constructor

Definition at line 32 of file Aibo3DControllerBehavior.h.

virtual Aibo3DControllerBehavior::~Aibo3DControllerBehavior (  )  [inline, virtual]

destructor

Definition at line 34 of file Aibo3DControllerBehavior.h.


Member Function Documentation

Aibo3DControllerBehavior Aibo3DControllerBehavior::operator= ( const Aibo3DControllerBehavior  )  [private]

don't call

void Aibo3DControllerBehavior::DoStart (  )  [virtual]

By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.

Reimplemented from BehaviorBase.

Definition at line 6 of file Aibo3DControllerBehavior.cc.

void Aibo3DControllerBehavior::DoStop (  )  [virtual]

By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).

Reimplemented from BehaviorBase.

Definition at line 27 of file Aibo3DControllerBehavior.cc.

virtual std::string Aibo3DControllerBehavior::getGUIType (  )  const [inline, virtual]

returns string corresponding to the Java GUI which should be launched

Definition at line 40 of file Aibo3DControllerBehavior.h.

Referenced by DoStart(), and DoStop().

virtual unsigned int Aibo3DControllerBehavior::getPort (  )  const [inline, virtual]

returns port number the Java GUI should connect to

Definition at line 42 of file Aibo3DControllerBehavior.h.

Referenced by DoStart().

static std::string Aibo3DControllerBehavior::getClassDescription (  )  [inline, static]

Gives a short description of what this class of behaviors does... you should override this (but don't have to).

If you do override this, also consider overriding getDescription() to return it

Reimplemented from BehaviorBase.

Definition at line 44 of file Aibo3DControllerBehavior.h.

Referenced by getDescription().

virtual std::string Aibo3DControllerBehavior::getDescription (  )  const [inline, virtual]

Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).

By default simply returns getName(), because any calls from a BehaviorBase function to getClassDescription() are going to call BehaviorBase::getClassDescription(), not ~YourSubClass~getClassDescription(), because static functions can't be virtual in C++ (doh!)

This means that getDescription called on a pointer to a BehaviorBase of unknown subtype would always return an empty string, which is pretty useless. So instead we return the name in this situation. If you want getDescription to return getClassDescription, you'll have to override it in your subclass to do so.

Reimplemented from BehaviorBase.

Definition at line 50 of file Aibo3DControllerBehavior.h.

static void Aibo3DControllerBehavior::setSerializerControl ( BehaviorSwitchControlBase ctrl  )  [inline, static]

sets the BehaviorSwitchControlBase which should be used to activate the serialization of WorldState data for the Aibo3D client to read

Definition at line 53 of file Aibo3DControllerBehavior.h.


Member Data Documentation

so we can start the serializer behavior if it's not already running

Definition at line 26 of file Aibo3DControllerBehavior.h.

Referenced by DoStart(), DoStop(), and setSerializerControl().

if true, indicates we launched the WorldState serializer, so we should stop it again if we stop

Definition at line 28 of file Aibo3DControllerBehavior.h.

Referenced by DoStart(), and DoStop().


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

Tekkotsu v4.0
Generated Thu Nov 22 00:58:08 2007 by Doxygen 1.5.4