- added FsmEval
git-svn-id: http://moon:8086/svn/software/trunk/projects/FsmEval@130 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
protected:
|
||||
void setState(IStateMachine::StateId state)
|
||||
{
|
||||
if(m_pStateMachine)
|
||||
{
|
||||
m_pStateMachine->setState(state);
|
||||
}
|
||||
}
|
||||
private:
|
||||
IStateMachine *m_pStateMachine;
|
||||
};
|
||||
|
||||
#endif /* ASTATE_HPP */
|
||||
|
||||
Reference in New Issue
Block a user