BWAPI
trunk/bwapi/include/BWAPI/Error.h
Go to the documentation of this file.
00001 #pragma once
00002 #include <string>
00003 #include <set>
00004 #include "Type.h"
00005 namespace BWAPI
00006 {
00007   class UnitType;
00008 
00010   class Error : public Type
00011   {
00012   public:
00013     Error();
00014     Error(int id);
00015 
00018     std::string toString() const;
00019     const char *c_str() const;
00020   };
00021   namespace Errors
00022   {
00025     Error getError(std::string name);
00026 
00028     const std::set<Error>& allErrors();
00029 
00030     void init();
00031 
00033     extern const Error Unit_Does_Not_Exist;
00034 
00036     extern const Error Unit_Not_Visible;
00037 
00040     extern const Error Unit_Not_Owned;
00041 
00046     extern const Error Unit_Busy;
00047 
00050     extern const Error Incompatible_UnitType;
00051 
00053     extern const Error Incompatible_TechType;
00054 
00056     extern const Error Incompatible_State;
00057 
00059     extern const Error Already_Researched;
00060 
00062     extern const Error Fully_Upgraded;
00063 
00065     extern const Error Currently_Researching;
00066 
00068     extern const Error Currently_Upgrading;
00069 
00071     extern const Error Insufficient_Minerals;
00072 
00074     extern const Error Insufficient_Gas;
00075 
00077     extern const Error Insufficient_Supply;
00078 
00081     extern const Error Insufficient_Energy;
00082 
00085     extern const Error Insufficient_Tech;
00086 
00089     extern const Error Insufficient_Ammo;
00090 
00093     extern const Error Insufficient_Space;
00094 
00096     extern const Error Invalid_Tile_Position;
00097 
00099     extern const Error Unbuildable_Location;
00100 
00102     extern const Error Unreachable_Location;
00103 
00106     extern const Error Out_Of_Range;
00107 
00109     extern const Error Unable_To_Hit;
00110 
00115     extern const Error Access_Denied;
00116 
00118     extern const Error File_Not_Found;
00119 
00121     extern const Error Invalid_Parameter;
00122 
00124     extern const Error None;
00125 
00127     extern const Error Unknown;
00128   }
00129 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines