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

Side by Side Diff: src/plugin/PluginDictionary.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
5 #include "PluginIniFileW.h"
6 #include "PluginChecksum.h"
7
8
9 class CPluginDictionary
10 {
11
12 private:
13
14 static CPluginDictionary* s_instance;
15
16 static CComAutoCriticalSection s_criticalSectionDictionary;
17
18 CPluginIniFileW::TSectionData m_dictionary;
19 CString m_dictionaryLanguage;
20 std::map<CString,CString> m_dictionaryConversions;
21
22 // private constructor used by the singleton pattern
23 CPluginDictionary(bool forceCreate=false);
24
25 public:
26
27 ~CPluginDictionary();
28
29 // Returns an instance of the Dictionary
30 static CPluginDictionary* GetInstance(bool forceCreate=false);
31
32 void Create(bool forceCreate=false);
33
34 // Initializes the Dictionary. Should be called before any thing else
35 void SetLanguage(const CString& lang);
36 bool IsLanguageSupported(const CString& lang);
37
38 CString Lookup(const CString& key);
39 };
40
41 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld