git-svn-id: http://moon:8086/svn/software/trunk/projects/FsmEval@132 b431acfa-c32f-4a4a-93f1-934dc6c82436
46 lines
662 B
C++
46 lines
662 B
C++
/*
|
|
* File: AState.hpp
|
|
* Author: jens
|
|
*
|
|
* Created on 21. Januar 2015, 05:12
|
|
*/
|
|
|
|
#ifndef ASTATE_HPP
|
|
#define ASTATE_HPP
|
|
|
|
#include "IStateMachine.hpp"
|
|
|
|
class AState
|
|
{
|
|
public:
|
|
AState()
|
|
: m_pStateMachine(0)
|
|
{
|
|
}
|
|
virtual ~AState() {}
|
|
|
|
void registerStateMachine(IStateMachine *pStateMachine)
|
|
{
|
|
m_pStateMachine = pStateMachine;
|
|
}
|
|
|
|
virtual void onTransition()
|
|
{
|
|
printf("%s\n", __PRETTY_FUNCTION__);
|
|
}
|
|
|
|
protected:
|
|
void setState(IStateMachine::StateId state)
|
|
{
|
|
if(m_pStateMachine)
|
|
{
|
|
m_pStateMachine->setState(state);
|
|
}
|
|
}
|
|
private:
|
|
IStateMachine *m_pStateMachine;
|
|
};
|
|
|
|
#endif /* ASTATE_HPP */
|
|
|