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().


Origin commit data
------------------
Branch: ni/coolstream
Commit: 6aa66b84c1
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-07-03 (Mon, 03 Jul 2017)

Origin message was:
------------------
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 was generated by Migit
This commit is contained in:
2017-07-03 10:50:20 +02:00
parent ff3e6fd949
commit 54da8c572f

View File

@@ -69,6 +69,7 @@ class CLocaleManager
loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false);
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 int mon);