Fix broken build since 9c74b645d02e90716b49f01c77dd4332db116508
[TortoiseGit.git] / src / Utils / PersonalDictionary.h
blobaf0f36486e6ed9518f3b773a3ec1a0848d46023c
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2007 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
20 #include <set>
22 #define PDICT_MAX_WORD_LENGTH 50
24 /**
25 * \ingroup Utils
26 * Utility class for handling a dictionary with custom words.
28 class CPersonalDictionary
30 public:
31 CPersonalDictionary(LONG lLanguage = 0);
32 ~CPersonalDictionary();
34 public:
35 bool AddWord(const CString& sWord);
36 bool FindWord(const CString& sWord);
37 bool Save();
38 void Init(LONG lLanguage = 0) {m_lLanguage = lLanguage;}
39 private:
40 bool Load();
41 private:
42 LONG m_lLanguage;
43 bool m_bLoaded;
44 std::set<CString> dict;