Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
Transition Class Referenceabstract

#include <transition.h>

Inheritance diagram for Transition:
[legend]
Collaboration diagram for Transition:
[legend]

Public Member Functions

 Transition (State *from, State *to)
 
 Transition (State *from, State *to, const std::string &name)
 
const std::string & name () const
 
void setName (const std::string &name)
 
Statefrom ()
 
Stateto ()
 
virtual bool isPossible () const =0
 
virtual void onPerformed ()
 

Protected Attributes

Statem_from
 
Statem_to
 
std::string m_name
 

Detailed Description

Abstract base class for a transition from one state to another. Derived classes need to implement isPossible(). The actual transition is performed by the update() of the parentstate of from- Transitions register themself at from, no need to call addTransition() on the State. to isn't informed it's "target" of a transition. Note that Transitions can go from any State to any other State, no matter which State they are nested in.


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