BWAPI
SPAR/AIModule/SparAIModule/DecisionMaking/Layer2Actions/Interface/Actions/Research.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "TacticalAction.h"
00003 #include "../../../../PerceptualState/Techs/Tech.h"
00004 
00005 namespace layer2
00006 {
00007   class Research : public virtual TacticalAction
00008   {
00009   public:
00010     Research(unsigned int priority)
00011       : TacticalAction(priority)
00012       , Process(Spar)
00013     {
00014     }
00015   };
00016 
00017   class UpgradeResearch : public virtual Research
00018   {
00019   public:
00020     UpgradeResearch(unsigned int priority, UpgradeTypeTech* upgrade)
00021       : Research(priority)
00022       , TacticalAction(priority)
00023       , Process(Spar)
00024       , m_upgrade(upgrade)
00025     {
00026     }
00027 
00028     virtual std::string getName() const
00029     {
00030       return "UpgradeResearch";
00031     }
00032 
00033   protected:
00034     virtual void output(std::ostream& out) const
00035     {
00036       Research::output(out);
00037 
00038       out << "Upgrade-Research(" << *m_upgrade << ")";
00039     }
00040 
00041     UpgradeTypeTech* const m_upgrade;
00042   };
00043 
00044   class TechResearch : public virtual Research
00045   {
00046   public:
00047     TechResearch(unsigned int priority, TechTypeTech* tech)
00048       : Research(priority)
00049       , TacticalAction(priority)
00050       , Process(Spar)
00051       , m_tech(tech)
00052     {
00053     }
00054 
00055     virtual std::string getName() const
00056     {
00057       return "TechResearch";
00058     }
00059 
00060   protected:
00061     virtual void output(std::ostream& out) const
00062     {
00063       Research::output(out);
00064 
00065       out << "Tech-Research(" << *m_tech << ")";
00066     }
00067 
00068     TechTypeTech* const m_tech;
00069   };
00070 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines