BWAPI
SPAR/AIModule/SparAIModule/DecisionMaking/Layer3Tactical/Layer3Tactical.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "../../../Utils/Utils.h"
00003 #include "../../PerceptualState/Common.h"
00004 #include "Interface/ArmyComposition.h"
00005 #include "Interface/TechSet.h"
00006 #include <BWAPI.h>
00007 
00008 template <class Layer3TacticalRecognition, class Layer2Actions>
00009 class Layer3Tactical : public Component
00010 {
00011 public:
00012   //
00013   // Default location types matching
00014   //
00015   template <class LocationType>
00016   struct LocationTypes {};
00017   template <>
00018   struct LocationTypes<AirLocation> {
00019     typedef empty<Layer3Tactical> Type;
00020   };
00021   template <>
00022   struct LocationTypes<BaseLocation> {
00023     typedef empty<Layer3Tactical> Type;
00024   };
00025   template <>
00026   struct LocationTypes<Chokepoint> {
00027     typedef empty<Layer3Tactical> Type;
00028   };
00029   template <>
00030   struct LocationTypes<Region> {
00031     typedef empty<Layer3Tactical> Type;
00032   };
00033   template <>
00034   struct LocationTypes<RegionLocation> {
00035     typedef empty<Layer3Tactical> Type;
00036   };
00037   template <>
00038   struct LocationTypes<Map> {
00039     typedef empty<Layer3Tactical> Type;
00040   };
00041 
00042   typedef empty<Layer3Tactical> L3UnitData;
00043 
00044   template <class TechType>
00045   struct TechTypes {};
00046   template <>
00047   struct TechTypes<UnitTypeTech> {
00048     typedef empty<Layer3Tactical> Type;
00049   };
00050   template <>
00051   struct TechTypes<TechTypeTech> {
00052     typedef empty<Layer3Tactical> Type;
00053   };
00054   template <>
00055   struct TechTypes<UpgradeTypeTech> {
00056     typedef empty<Layer3Tactical> Type;
00057   };
00058 
00059   Layer3Tactical(Layer3TacticalRecognition& layer3TacticalRecognition, Layer2Actions& layer2Actions)
00060     : m_layer3TacticalRecognition(layer3TacticalRecognition)
00061     , m_layer2Actions(layer2Actions)
00062   {
00063   }
00064 
00065   void onStart() {}
00066   void onFrame() {}
00067   void onEnd() {}
00068   void onSendText(std::string text) {}
00069 
00071   // GUI //
00073   ArmyComposition getTargetArmyComposition() const
00074   {
00075     return ArmyComposition();
00076   }
00077   TechSet getTargetTechs() const
00078   {
00079     return TechSet();
00080   }
00081 
00082 protected:
00083   Layer3TacticalRecognition& m_layer3TacticalRecognition;
00084   Layer2Actions& m_layer2Actions;
00085 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines