X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fcore%2Fdefine.autoenum.hpp;fp=include%2Fanna%2Fcore%2Fdefine.autoenum.hpp;h=a05c120812a3ec719084a53f635384f2e70f2561;hp=9378110bff30544f142f9a6ffc3e60d0fc681e68;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/core/define.autoenum.hpp b/include/anna/core/define.autoenum.hpp index 9378110..a05c120 100644 --- a/include/anna/core/define.autoenum.hpp +++ b/include/anna/core/define.autoenum.hpp @@ -47,19 +47,19 @@ */ #define anna_declare_enum(name) \ static const char* literal []; \ - static int calculateSize () throw () { \ + static int calculateSize () { \ int ii = 0; \ while (literal [ii] != NULL) ii ++; \ return ii; \ } \ - static _v asEnum (const char* str) throw () { \ + static _v asEnum (const char* str) { \ for (int ii = 0; literal [ii] != NULL; ii ++) { \ if (strcasecmp (str, literal [ii]) == 0) \ return (_v) ii; \ } \ return None; \ } \ - static _v asEnumEx (const char* str) throw (anna::RuntimeException) { \ + static _v asEnumEx (const char* str) noexcept(false) { \ if (str == NULL) { \ std::string msg (#name); \ msg += "::asEnumEx | str can not be null"; \ @@ -76,11 +76,11 @@ } \ return result; \ } \ - static _v asEnum (const std::string& str) throw () { return asEnum (str.c_str ()); } \ - static _v asEnumEx (const std::string& str) throw (anna::RuntimeException) { return asEnumEx (str.c_str ()); } \ - static const char* asCString (const _v v) throw () { return (v != None) ? literal [v]: NULL; } \ - static const char* asNotNullCString (const _v v) throw () { return (v != None) ? literal [v]: ""; } \ - static std::string asList () throw () {\ + static _v asEnum (const std::string& str) { return asEnum (str.c_str ()); } \ + static _v asEnumEx (const std::string& str) noexcept(false) { return asEnumEx (str.c_str ()); } \ + static const char* asCString (const _v v) { return (v != None) ? literal [v]: NULL; } \ + static const char* asNotNullCString (const _v v) { return (v != None) ? literal [v]: ""; } \ + static std::string asList () {\ std::string result;\ for (int ii = 0; literal [ii] != NULL; ii ++) { \ if (ii == 0 && strcmp (literal [ii], "None") == 0) continue; \