BWAPI
SPAR/AIModule/SparAIModule/Utils/FSM/IFSMState.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "../../Utils/Component.h"
00003 #include "../Event.h"
00004 #include <iostream>
00005 
00009 class IFSMState : public Component
00010 {
00011 public:
00012   virtual ~IFSMState()
00013   {
00014   }
00015 
00021   virtual void externalTerminate() = 0;
00022 
00026   virtual std::string getName() const = 0;
00027 
00028   DECLARE_EVENT(OnStateExit);
00029   OnStateExit& getStateExitEvent() { return m_stateExitEvent; }
00030 
00031   friend std::ostream& operator<<(std::ostream& out, const IFSMState& state)
00032   {
00033     out << state.getName();
00034     return out;
00035   }
00036 
00037 protected:
00038   EVENT(OnStateExit) m_stateExitEvent;
00039 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines