|
template<typename... Rest> |
std::string | formatSure (const std::string &key, const Rest &...rest) |
|
template<typename... Rest> |
std::string | format (const std::string &key, const std::string &def, const Rest &...rest) |
|
std::string | vformat (const std::string &key, const std::string &def, const std::vector< Poco::Dynamic::Var > &args) |
|
|
void | prepareArg (std::vector< Poco::Dynamic::Var > &tmp, const char *first) |
|
template<typename Type > |
void | prepareArg (std::vector< Poco::Dynamic::Var > &tmp, const Type &value) |
|
void | formatCollect (std::vector< Poco::Dynamic::Var > &) |
|
template<typename First , typename... Rest> |
void | formatCollect (std::vector< Poco::Dynamic::Var > &tmp, const First &first, const Rest &...rest) |
|
virtual std::string | formatImpl (const std::string &key, const std::vector< Poco::Dynamic::Var > &args)=0 |
|
std::string | formatFallback (const std::string &def, const std::vector< Poco::Dynamic::Var > &args) const |
|
template<typename... Rest>
std::string BeeeOn::Translator::format |
( |
const std::string & |
key, |
|
|
const std::string & |
def, |
|
|
const Rest &... |
rest |
|
) |
| |
|
inline |
Format the message identified by given key. If the key is not found, it returns the given def formatted via formatFallback(). The method calls formatImpl internally.
string Translator::formatFallback |
( |
const std::string & |
def, |
|
|
const std::vector< Poco::Dynamic::Var > & |
args |
|
) |
| const |
|
protected |
It uses the def as a fallback format. The fallback assumes using of the Poco::format() where the Poco::Dynamic::Var is converted to Poco::Any on fly.
virtual std::string BeeeOn::Translator::formatImpl |
( |
const std::string & |
key, |
|
|
const std::vector< Poco::Dynamic::Var > & |
args |
|
) |
| |
|
protectedpure virtual |
template<typename... Rest>
std::string BeeeOn::Translator::formatSure |
( |
const std::string & |
key, |
|
|
const Rest &... |
rest |
|
) |
| |
|
inline |
Format the message identified by given key. This method should be used only for translations where it is sure that the translation exists otherwise a messy string could be returned easily. The method calls formatImpl internally.
std::string BeeeOn::Translator::vformat |
( |
const std::string & |
key, |
|
|
const std::string & |
def, |
|
|
const std::vector< Poco::Dynamic::Var > & |
args |
|
) |
| |
|
inline |
Format the message identified by given key. If the key is not found, it returns the given def formatted via formatFallback(). The method calls formatImpl internally.
The documentation for this class was generated from the following files:
- /var/lib/jenkins/workspace/beeeon-gateway-master/base/src/l10n/Translator.h
- /var/lib/jenkins/workspace/beeeon-gateway-master/base/src/l10n/Translator.cpp