Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2015-07-24 11:57:03 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:58:13 +0300
commitf40a697cb7c62cf4b21cb8a31a3f91b7acad7b22 (patch)
tree7b730684eec4a1a671116f980a8697a65892ef72 /platform/get_text_by_id.hpp
parent2669ac941490a177e85e6b3ea2b6348817649ca4 (diff)
Implementation of GetTextById class.
Diffstat (limited to 'platform/get_text_by_id.hpp')
-rw-r--r--platform/get_text_by_id.hpp23
1 files changed, 23 insertions, 0 deletions
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 <std/string.hpp>
+#include <std/unordered_map.hpp>
+
+
+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<string, string> m_localeTexts;
+};
+} // namespace platform