BWAPI
|
00001 #pragma once 00002 #include <string> 00003 #include <set> 00004 00005 namespace BWAPI 00006 { 00007 class UnitType; 00008 00010 class Error 00011 { 00012 public: 00013 Error(); 00014 Error(int id); 00015 Error(const Error& other); 00016 Error& operator=(const Error& other); 00017 operator int() const; 00018 00020 int getID() const; 00021 00024 std::string toString() const; 00025 private: 00026 int id; 00027 }; 00028 namespace Errors 00029 { 00032 Error getError(std::string name); 00033 00035 std::set<Error>& allErrors(); 00036 00037 void init(); 00038 00040 extern const Error Unit_Does_Not_Exist; 00041 00043 extern const Error Unit_Not_Visible; 00044 00047 extern const Error Unit_Not_Owned; 00048 00053 extern const Error Unit_Busy; 00054 00057 extern const Error Incompatible_UnitType; 00058 00060 extern const Error Incompatible_TechType; 00061 00063 extern const Error Incompatible_State; 00064 00066 extern const Error Already_Researched; 00067 00069 extern const Error Fully_Upgraded; 00070 00072 extern const Error Currently_Researching; 00073 00075 extern const Error Currently_Upgrading; 00076 00078 extern const Error Insufficient_Minerals; 00079 00081 extern const Error Insufficient_Gas; 00082 00084 extern const Error Insufficient_Supply; 00085 00088 extern const Error Insufficient_Energy; 00089 00092 extern const Error Insufficient_Tech; 00093 00096 extern const Error Insufficient_Ammo; 00097 00100 extern const Error Insufficient_Space; 00101 00103 extern const Error Invalid_Tile_Position; 00104 00106 extern const Error Unbuildable_Location; 00107 00109 extern const Error Unreachable_Location; 00110 00113 extern const Error Out_Of_Range; 00114 00116 extern const Error Unable_To_Hit; 00117 00122 extern const Error Access_Denied; 00123 00125 extern const Error File_Not_Found; 00126 00128 extern const Error Invalid_Parameter; 00129 00131 extern const Error None; 00132 00134 extern const Error Unknown; 00135 } 00136 }