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

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

Issue 11254007: Installation with registry keys
Patch Set: Created July 25, 2013, 9:57 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
« no previous file with comments | « src/plugin/PluginUtil.cpp ('k') | src/shared/Dictionary.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef DICTIONARY_H 1 #ifndef DICTIONARY_H
2 #define DICTIONARY_H 2 #define DICTIONARY_H
3 3
4 #include <map> 4 #include <map>
5 #include <string> 5 #include <string>
6 #include <utility> 6 #include <utility>
7 #include "Utils.h"
7 8
8 class Dictionary 9 class Dictionary
9 { 10 {
10 friend class DictionaryTest; 11 friend class DictionaryTest;
11 12
12 public: 13 public:
13 static void Create(const std::wstring& locale); 14 static void Create(const std::wstring& locale, std::wstring basePath = Locatio n::locales_dir() );
14 static Dictionary* GetInstance(); 15 static Dictionary* GetInstance();
15 std::wstring Lookup(const std::string& section, const std::string& key) const; 16 std::wstring Lookup(const std::string& section, const std::string& key) const;
16 17
17 private: 18 private:
18 static Dictionary* instance; 19 static Dictionary* instance;
19 20
20 typedef std::pair<std::string,std::string> KeyType; 21 typedef std::pair<std::string,std::string> KeyType;
21 typedef std::map<KeyType,std::wstring> DataType; 22 typedef std::map<KeyType,std::wstring> DataType;
22 DataType data; 23 DataType data;
23 24
24 Dictionary(const std::wstring& locale); 25 Dictionary(const std::wstring& locale, std::wstring basePath);
25 bool ReadDictionary(const std::wstring& basePath, const std::wstring& locale); 26 bool ReadDictionary(const std::wstring& basePath, const std::wstring& locale);
26 }; 27 };
27 28
28 #endif 29 #endif
OLDNEW
« no previous file with comments | « src/plugin/PluginUtil.cpp ('k') | src/shared/Dictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld