Homepage Demos Overview Downloads Tutorials Reference
Credits

Transition Class Reference

#include <Transition.h>

Inheritance diagram for Transition:

Inheritance graph
[legend]
List of all members.

Detailed Description

Represents a transition between StateNodes.

This is an abstract class - you'll want to subclass it to put conditions on the transitions

DoStart() will be called when this transition is 'active' - it should listen/monitor for the transition it represents until DoStop() is called.

If the conditions are satisified for a transition, you should call activate() to do the appropriate notifications.

Definition at line 18 of file Transition.h.

Public Member Functions

 Transition (StateNode *source, StateNode *destination)
 constructor, specifies source and destination StateNode's

 Transition (const Transition &t)
 copy constructor, just in case you need it

virtual ~Transition ()
 destructor

virtual void activate ()
 call this when the transition should be made, base class version simply calls StateNode::DoStop() on src and StateNode::DoStart() on dst, but you can override.

Transitionoperator= (const Transition &t)
 assignment operator (only does shallow copy)


Protected Attributes

StateNodesrc
 the node being transitioned from

StateNodedst
 the node being transitioned to


Constructor & Destructor Documentation

Transition::Transition StateNode source,
StateNode destination
[inline]
 

constructor, specifies source and destination StateNode's

Definition at line 21 of file Transition.h.

References dst, and src.

Transition::Transition const Transition t  )  [inline]
 

copy constructor, just in case you need it

Definition at line 23 of file Transition.h.

References dst, and src.

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

destructor

Definition at line 25 of file Transition.h.


Member Function Documentation

void Transition::activate  )  [virtual]
 

call this when the transition should be made, base class version simply calls StateNode::DoStop() on src and StateNode::DoStart() on dst, but you can override.

Definition at line 5 of file Transition.cc.

References ReferenceCounter::AddReference(), StateNode::DoStart(), StateNode::DoStop(), dst, get_time(), BehaviorBase::getName(), Socket::printf(), ReferenceCounter::RemoveReference(), serr, and src.

Here is the call graph for this function:

Transition& Transition::operator= const Transition t  )  [inline]
 

assignment operator (only does shallow copy)

Definition at line 31 of file Transition.h.

References dst, BehaviorBase::operator=(), and src.

Here is the call graph for this function:


Member Data Documentation

StateNode* Transition::dst [protected]
 

the node being transitioned to

Definition at line 34 of file Transition.h.

StateNode* Transition::src [protected]
 

the node being transitioned from

Definition at line 33 of file Transition.h.


The documentation for this class was generated from the following files:
Tekkotsu v1.5
Generated Fri Oct 10 15:58:02 2003 by Doxygen 1.3.4