CLocaleManager: add casted version of getText() function

Allows easier handling with strings instead const char
for usage as string source. Separate casts are not requiered.

Overload of getText() was not possible but,
name  getTextAsString() is keeping namespace of base function
getText().
This commit is contained in:
2017-07-03 10:50:20 +02:00
parent d7e196c58a
commit 6aa66b84c1

View File

@@ -69,6 +69,7 @@ class CLocaleManager
loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false); loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false);
const char * getText(const neutrino_locale_t keyName) const; const char * getText(const neutrino_locale_t keyName) const;
std::string getTextAsString(const neutrino_locale_t keyName) const {return (static_cast<std::string>(getText(keyName)));}
static neutrino_locale_t getMonth (const struct tm * struct_tm_p); static neutrino_locale_t getMonth (const struct tm * struct_tm_p);
static neutrino_locale_t getMonth (const int mon); static neutrino_locale_t getMonth (const int mon);