X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/cd64751cac4c56591bee9b0a9c2a626ce40e67db..82c7b78d7b7cf797f0663c96f44b092103802035:/stglibs/srvconf.lib/include/stg/property_parsers.h?ds=inline diff --git a/stglibs/srvconf.lib/include/stg/property_parsers.h b/stglibs/srvconf.lib/include/stg/property_parsers.h index cb3943db..d1e6a893 100644 --- a/stglibs/srvconf.lib/include/stg/property_parsers.h +++ b/stglibs/srvconf.lib/include/stg/property_parsers.h @@ -50,6 +50,7 @@ typedef std::map PROPERTY_PARSERS; bool CheckValue(const char ** attr); template +inline bool GetValue(const char ** attr, T & value) { if (CheckValue(attr)) @@ -59,6 +60,7 @@ return true; } template <> +inline bool GetValue(const char ** attr, std::string & value) { if (!CheckValue(attr)) @@ -68,6 +70,7 @@ return true; } template <> +inline bool GetValue(const char ** attr, double & value) { if (CheckValue(attr)) @@ -84,6 +87,7 @@ template void AddParser(PROPERTY_PARSERS & parsers, const std::string & name, T & value, const typename PROPERTY_PARSER::FUNC & func = GetValue); template +inline void AddParser(PROPERTY_PARSERS & parsers, const std::string & name, T & value, const typename PROPERTY_PARSER::FUNC & func) { parsers.insert(std::make_pair(ToLower(name), new PROPERTY_PARSER(value, func)));