From f40a697cb7c62cf4b21cb8a31a3f91b7acad7b22 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Fri, 24 Jul 2015 11:57:03 +0300 Subject: Implementation of GetTextById class. --- platform/get_text_by_id.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 platform/get_text_by_id.hpp (limited to 'platform/get_text_by_id.hpp') diff --git a/platform/get_text_by_id.hpp b/platform/get_text_by_id.hpp new file mode 100644 index 0000000000..d5dba5bc53 --- /dev/null +++ b/platform/get_text_by_id.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include +#include + + +namespace platform +{ + +/// GetTextById represents text messages which are saved in textsDir +/// in a specified locale. +class GetTextById +{ +public: + GetTextById(string const & textsDir, string const & localeName); + + bool IsValid() const { return !m_localeTexts.empty(); } + string operator()(string const & textId) const; + +private: + unordered_map m_localeTexts; +}; +} // namespace platform -- cgit v1.2.3