Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/shared/Dictionary.h

Issue 10897028: Create a shared dictionary class for plugin and engine (Closed)
Patch Set: Created June 7, 2013, 12:42 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #ifndef DICTIONARY_H
2 #define DICTIONARY_H
3
4 #include <map>
5 #include <string>
6 #include <utility>
7
8 class Dictionary
9 {
10 friend class DictionaryTest;
11
12 public:
13 static void Create(const std::wstring& locale);
14 static Dictionary* GetInstance();
15 std::wstring Lookup(const std::string& section, const std::string& key) const;
16
17 private:
18 static Dictionary* instance;
19
20 typedef std::pair<std::string,std::string> KeyType;
21 typedef std::map<KeyType,std::wstring> DataType;
22 DataType data;
23
24 Dictionary(const std::wstring& locale);
25 bool ReadDictionary(const std::wstring& basePath, const std::wstring& locale);
26 };
27
28 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld