OLD | NEW |
(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 |
OLD | NEW |