Robot Devastation
Public Member Functions | Private Attributes | List of all members
rd::FiniteStateMachine Class Reference

Class implementing a finite state machine.

#include <StateMachine.hpp>

Public Member Functions

 FiniteStateMachine (const std::vector< StateDirector * > &stateDirectors, int initial_state_id)
 Creates a FiniteStateMachine from the states that form it. More...
 
bool start ()
 Starts the state machine (running the initial state)
 
bool stop ()
 
int getCurrentState () const
 Returns current active state id.
 

Private Attributes

std::vector< StateDirector * > stateDirectors
 
int initial_state_id
 

Constructor & Destructor Documentation

◆ FiniteStateMachine()

rd::FiniteStateMachine::FiniteStateMachine ( const std::vector< StateDirector * > &  stateDirectors,
int  initial_state_id 
)
Parameters
stateDirectorsvector of StateDirector forming the FiniteStateMachine
initial_state_idId of the initial state

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