BWAPI
SPAR/AIModule/SparAIModule/DecisionMaking/Layer1Reactive/FSM/BehaviorState.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "../../../Utils/FSM/FSMState.h"
00003 #include "Behavior.h"
00004 
00005 typedef IFSMState IBehaviorState;
00006 
00012 template <class Behavior, class DerivedState>
00013 class BehaviorState : public FSMState<Behavior, DerivedState>
00014 {
00015 public:
00016   BehaviorState(Behavior& behavior)
00017     : FSMState(behavior)
00018   {
00019   }
00020 
00021   virtual ~BehaviorState()
00022   {
00023   }
00024 
00030   Behavior& getBehavior()
00031   {
00032     return dynamic_cast<Behavior&>(m_context);
00033   }
00034 private:
00035   BehaviorState(const BehaviorState& other);
00036 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines