|
ManaPlus
|
Go to the documentation of this file.
22 #ifndef ENUMS_SIMPLETYPES_STRINGDEFINES_H
23 #define ENUMS_SIMPLETYPES_STRINGDEFINES_H
27 #define stringEnumStart(type) \
28 std::map<std::string, type> mStringsArray; \
29 bool find(const std::string &key) \
31 return mStringsArray.find(key) != mStringsArray.end(); \
33 type get(const std::string &key) \
35 return mStringsArray[key]; \
39 mStringsArray.clear();
41 #define strEnumDef(prefix, name) \
42 mStringsArray[#name] = prefix::name; \
44 #define strEnumDef2(prefix, name, str) \
45 mStringsArray[#name] = prefix::name; \
46 mStringsArray[str] = prefix::name;
48 #define stringEnumEnd \