00001 #ifndef EXPLOSIONTYPE_H 00002 #define EXPLOSIONTYPE_H 00003 00004 #include <string> 00005 #include <set> 00006 00007 namespace FastEcslent 00008 { 00009 class ExplosionType 00010 { 00011 public: 00012 ExplosionType(); 00013 ExplosionType(int id); 00014 ExplosionType(const ExplosionType& other); 00015 ExplosionType& operator=(const ExplosionType& other); 00016 bool operator==(const ExplosionType& other) const; 00017 bool operator!=(const ExplosionType& other) const; 00018 bool operator<(const ExplosionType& other) const; 00019 00021 int getID() const; 00022 00024 std::string getName() const; 00025 private: 00026 int id; 00027 }; 00028 00029 namespace ExplosionTypes 00030 { 00032 ExplosionType getExplosionType(std::string name); 00033 00035 std::set<ExplosionType>& allExplosionTypes(); 00036 00037 00038 void init(); 00039 extern const ExplosionType None; 00040 extern const ExplosionType Normal; 00041 extern const ExplosionType Radial_Splash; 00042 extern const ExplosionType Enemy_Splash; 00043 extern const ExplosionType Enemy_Line_Splash; 00044 extern const ExplosionType Nuclear_Missile; 00045 extern const ExplosionType EMP_Shockwave; 00046 extern const ExplosionType Air_Splash; 00047 extern const ExplosionType Unknown; 00048 } 00049 } 00050 #endif