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-30 10:36:12 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:58:47 +0300
commit14c8bd3b20a9b99fa11ec9ffa61d045e50c3748e (patch)
treec98c209769814ffe1950489e64441910e0581a4f /platform/get_text_by_id.hpp
parent2ecb8efa5c2938435d2bff520d69b7dc9724eccc (diff)
GetTextById::operator() returns flag if textId is found in a specified locale.
Diffstat (limited to 'platform/get_text_by_id.hpp')
-rw-r--r--platform/get_text_by_id.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/get_text_by_id.hpp b/platform/get_text_by_id.hpp
index c018e7ec84..b70bac0cec 100644
--- a/platform/get_text_by_id.hpp
+++ b/platform/get_text_by_id.hpp
@@ -1,7 +1,8 @@
#pragma once
-#include <std/string.hpp>
-#include <std/unordered_map.hpp>
+#include "std/string.hpp"
+#include "std/unordered_map.hpp"
+#include "std/utility.hpp"
namespace platform
{
@@ -20,7 +21,10 @@ public:
GetTextById(TextSource textSouce, string const & localeName);
bool IsValid() const { return !m_localeTexts.empty(); }
- string operator()(string const & textId) const;
+ /// @return a pair of a text string in a specified locale for textId and a boolean flag.
+ /// If textId is found in m_localeTexts then the boolean flag is set to true.
+ /// The boolean flag is set to false otherwise.
+ pair<string, bool> operator()(string const & textId) const;
private:
unordered_map<string, string> m_localeTexts;