Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

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

Definition at line 10 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 enable ()=0
 called by StateNode when it becomes active - use this to request events (or whatever you need to do)

virtual void disable ()=0
 called by StateNode when it becomes inactive - undo whatever you did in Enable()

virtual void activate ()
 call this when the transition should be made, base class version simply calls StateNode::Leave() on src and StateNode::Enter() 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 13 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 15 of file Transition.h.

References dst, and src.

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

destructor

Definition at line 17 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::Leave() on src and StateNode::Enter() on dst, but you can override.

Definition at line 4 of file Transition.cc.

References StateNode::DoStart(), StateNode::DoStop(), dst, and src.

virtual void Transition::disable  )  [pure virtual]
 

called by StateNode when it becomes inactive - undo whatever you did in Enable()

Implemented in CompareTrans< T >, TimeOutTrans, and VisualTargetCloseTrans.

virtual void Transition::enable  )  [pure virtual]
 

called by StateNode when it becomes active - use this to request events (or whatever you need to do)

Implemented in CompareTrans< T >, TimeOutTrans, and VisualTargetCloseTrans.

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

assignment operator (only does shallow copy)

Definition at line 28 of file Transition.h.

References dst, and src.


Member Data Documentation

StateNode* Transition::dst [protected]
 

the node being transitioned to

Definition at line 31 of file Transition.h.

StateNode* Transition::src [protected]
 

the node being transitioned from

Definition at line 30 of file Transition.h.


The documentation for this class was generated from the following files:
Tekkotsu v1.4
Generated Sat Jul 19 00:09:13 2003 by Doxygen 1.3.2