BWAPI
|
00001 #pragma once 00002 #include <set> 00003 #include <string> 00004 namespace Arbitrator 00005 { 00006 template <class _Tp,class _Val> 00007 class Controller 00008 { 00009 public: 00010 virtual void onOffer(std::set<_Tp> objects)=0; 00011 virtual void onRevoke(_Tp, _Val bid)=0; 00012 virtual std::string getName() const=0; 00013 virtual std::string getShortName() const 00014 { 00015 if (getName().length() >= 3) 00016 return getName().substr(0, 3); 00017 else 00018 return "???"; 00019 } 00020 virtual void update()=0; 00021 }; 00022 }