OpenJAUS Software Development Kit  4.3.1
Public Member Functions | Protected Attributes | Friends | List of all members
openjaus::model::StateMachine Class Reference

This is a brief description. More...

#include <StateMachine.h>

Public Member Functions

 StateMachine ()
 
virtual ~StateMachine ()
 
std::string getName () const
 Accessor to get the value of name. More...
 
bool setName (std::string name)
 Accessor to set value of name. More...
 
const std::list< State *> & getStateStack () const
 Accessor to get the value of stateStack. More...
 
bool setStateStack (std::list< State * > stateStack)
 Accessor to set value of stateStack. More...
 
const std::vector< State *> & getStates () const
 Accessor to get the value of states. More...
 
bool setStates (const State &states)
 Accessor to set value of states. More...
 
StategetParentState () const
 Accessor to get the value of parentState. More...
 
bool setParentState (State *parentState)
 Accessor to set value of parentState. More...
 
StategetCurrentState () const
 Accessor to get the value of currentState. More...
 
StategetStartingState () const
 Accessor to get the value of startingState. More...
 
bool setStartingState (State *startingState)
 Accessor to set value of startingState. More...
 
const std::vector< Transition *> & getDefaultStateTransitions () const
 Accessor to get the value of defaultStateTransitions. More...
 
bool setDefaultStateTransitions (const Transition &defaultStateTransitions)
 Accessor to set value of defaultStateTransitions. More...
 
bool processTrigger (Trigger *trigger)
 Operation processTrigger. More...
 
State getState (std::string name)
 Operation getState. More...
 
int addState (State &state)
 Operation addState. More...
 
int addDefaultStateTransition (Transition &transition)
 Operation addDefaultStateTransition. More...
 
int removeDefaultStateTransition (Transition &transition)
 Operation removeDefaultStateTransition. More...
 
MessagegetResponse (Trigger *trigger)
 
bool setCurrentState (State *state)
 Operation setCurrentState. More...
 
bool executeTransition (Transition *transition)
 Operation executeTransition. More...
 
void entry ()
 Operation entry. More...
 
void exit ()
 Operation exit. More...
 
std::string getQualifedName ()
 Operation getQualifedName. More...
 
virtual std::string toString () const
 
template<class MessageType , class CallbackClass >
void addMessageCallback (bool(CallbackClass::*callback)(MessageType &messageRef), CallbackClass *object)
 
template<class CallbackClass >
void addMessageCallback (bool(CallbackClass::*callback)(Trigger *trigger), CallbackClass *object)
 
template<class MessageType >
void addMessageCallback (bool(*callback)(MessageType &messageRef))
 

Protected Attributes

std::string name
 
std::list< State *> stateStack
 
std::vector< State *> states
 
StateparentState
 
StatecurrentState
 
StatestartingState
 
std::vector< Transition *> defaultStateTransitions
 
std::vector< MessageCallback *> callbacks
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const StateMachine &object)
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const StateMachine *object)
 

Detailed Description

Detailed description.

Author
Name (name@.nosp@m.emai.nosp@m.l.com)

Constructor & Destructor Documentation

§ StateMachine()

openjaus::model::StateMachine::StateMachine ( )

§ ~StateMachine()

openjaus::model::StateMachine::~StateMachine ( )
virtual

Member Function Documentation

§ addDefaultStateTransition()

int openjaus::model::StateMachine::addDefaultStateTransition ( Transition transition)
Parameters
transition

§ addMessageCallback() [1/3]

template<class MessageType , class CallbackClass >
void openjaus::model::StateMachine::addMessageCallback ( bool(CallbackClass::*)(MessageType &messageRef)  callback,
CallbackClass *  object 
)
inline

§ addMessageCallback() [2/3]

template<class CallbackClass >
void openjaus::model::StateMachine::addMessageCallback ( bool(CallbackClass::*)(Trigger *trigger)  callback,
CallbackClass *  object 
)
inline

§ addMessageCallback() [3/3]

template<class MessageType >
void openjaus::model::StateMachine::addMessageCallback ( bool(*)(MessageType &messageRef)  callback)
inline

§ addState()

int openjaus::model::StateMachine::addState ( State state)
Parameters
state

§ entry()

void openjaus::model::StateMachine::entry ( )

§ executeTransition()

bool openjaus::model::StateMachine::executeTransition ( Transition transition)
Parameters
transition

§ exit()

void openjaus::model::StateMachine::exit ( )

§ getCurrentState()

State * openjaus::model::StateMachine::getCurrentState ( ) const

§ getDefaultStateTransitions()

const std::vector< Transition *> & openjaus::model::StateMachine::getDefaultStateTransitions ( ) const

§ getName()

std::string openjaus::model::StateMachine::getName ( void  ) const

§ getParentState()

State * openjaus::model::StateMachine::getParentState ( ) const

§ getQualifedName()

std::string openjaus::model::StateMachine::getQualifedName ( )

§ getResponse()

Message * openjaus::model::StateMachine::getResponse ( Trigger trigger)
Parameters
trigger

§ getStartingState()

State * openjaus::model::StateMachine::getStartingState ( ) const

§ getState()

State openjaus::model::StateMachine::getState ( std::string  name)
Parameters
name

§ getStates()

const std::vector< State *> & openjaus::model::StateMachine::getStates ( ) const

§ getStateStack()

const std::list< State *> & openjaus::model::StateMachine::getStateStack ( ) const

§ processTrigger()

bool openjaus::model::StateMachine::processTrigger ( Trigger trigger)
Parameters
trigger

§ removeDefaultStateTransition()

int openjaus::model::StateMachine::removeDefaultStateTransition ( Transition transition)
Parameters
transition

§ setCurrentState()

bool openjaus::model::StateMachine::setCurrentState ( State state)
Parameters
state

§ setDefaultStateTransitions()

bool openjaus::model::StateMachine::setDefaultStateTransitions ( const Transition defaultStateTransitions)
Parameters
defaultStateTransitionsThe value of the new defaultStateTransitions.

§ setName()

bool openjaus::model::StateMachine::setName ( std::string  name)
Parameters
nameThe value of the new name.

§ setParentState()

bool openjaus::model::StateMachine::setParentState ( State parentState)
Parameters
parentStateThe value of the new parentState.

§ setStartingState()

bool openjaus::model::StateMachine::setStartingState ( State startingState)
Parameters
startingStateThe value of the new startingState.

§ setStates()

bool openjaus::model::StateMachine::setStates ( const State states)
Parameters
statesThe value of the new states.

§ setStateStack()

bool openjaus::model::StateMachine::setStateStack ( std::list< State * >  stateStack)
Parameters
stateStackThe value of the new stateStack.

§ toString()

std::string openjaus::model::StateMachine::toString ( ) const
virtual

Friends And Related Function Documentation

§ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const StateMachine object 
)
friend

§ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const StateMachine object 
)
friend

Member Data Documentation

§ callbacks

std::vector< MessageCallback* > openjaus::model::StateMachine::callbacks
protected

§ currentState

State* openjaus::model::StateMachine::currentState
protected

§ defaultStateTransitions

std::vector< Transition* > openjaus::model::StateMachine::defaultStateTransitions
protected

§ name

std::string openjaus::model::StateMachine::name
protected

§ parentState

State* openjaus::model::StateMachine::parentState
protected

§ startingState

State* openjaus::model::StateMachine::startingState
protected

§ states

std::vector< State* > openjaus::model::StateMachine::states
protected

§ stateStack

std::list< State * > openjaus::model::StateMachine::stateStack
protected

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