AI_State.h
Go to the documentation of this file.00001 #ifndef AI_STATE_H 00002 #define AI_STATE_H 00003 00004 #include "AI_Global.h" 00005 #include "AI_StateMachine.h" 00006 00007 00021 class AI_State 00022 { 00023 //*** Attributes 00024 protected: 00026 // (returned when tested condition is true or if there is only output state) 00027 ai_index m_i_true_state; 00029 ai_index m_i_false_state; 00030 00031 public: 00032 //*** Constructors & destructors 00033 AI_State(void); 00034 AI_State(const int i_state_out); 00035 AI_State(const int i_state_true, const int i_state_false); 00036 virtual ~AI_State(void); 00037 00038 //*** Running 00039 virtual ai_index step( AI_StateMachine::Session *ptr_session ) = 0; 00040 virtual bool isInterrupt( void ) const; 00041 }; 00042 00043 00046 inline 00047 AI_State::AI_State(void) 00048 { 00049 } 00050 00051 00054 inline 00055 AI_State::AI_State(const int i_state_out) : 00056 m_i_true_state(i_state_out) 00057 { 00058 } 00059 00060 00063 inline 00064 AI_State::AI_State(const int i_index_true, const int i_index_false) : 00065 m_i_true_state(i_index_true), 00066 m_i_false_state(i_index_false) 00067 { 00068 } 00069 00070 00073 inline 00074 AI_State::~AI_State(void) 00075 { 00076 } 00077 00078 00081 inline 00082 bool AI_State::isInterrupt( void ) const 00083 { 00084 return false; 00085 } 00086 00087 00088 #endif