H2 Combustion
|
00001 #ifndef zh2_substance 00002 #define zh2_substance 00003 00004 #include <string> 00005 #include <unordered_map> 00006 #include <list> 00007 #include <vector> 00008 00009 namespace h2comb { 00010 00011 class Compound; 00012 00018 class Substance 00019 { 00020 00021 Substance(std::string _name, Compound * = 0) : name(_name) 00022 { 00023 } 00024 public: 00025 std::string getName() 00026 { 00027 return name; 00028 } 00029 00030 00031 static Substance *findAddSubstance(std::string name); 00032 static Substance *findSubstance(std::string name); 00033 00034 static std::list<Substance *> allSubstances; 00035 00036 private: 00037 std::string name; 00038 00039 static std::unordered_map<std::string, Substance *> allNames; 00040 }; 00041 00042 } 00043 00044 #endif 00045 00046