1 /*
2 * This file is part of SpellChecker plugin for Code::Blocks Studio
3 * Copyright (C) 2009 Daniel Anselmi
4 *
5 * SpellChecker plugin is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * SpellChecker plugin 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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with SpellChecker. If not, see <http://www.gnu.org/licenses/>.
17 *
18 */
19 #ifndef WXTHES_H
20 #define WXTHES_H
21 
22 // some maximum sizes for buffers
23 //#define MAX_WD_LEN 200
24 //#define MAX_LN_LEN 16384
25 
26 
27 // For compilers that support precompilation, includes "wx/wx.h".
28 #include <wx/wxprec.h>
29 
30 #ifndef WX_PRECOMP
31 #include <wx/wx.h>
32 #endif
33 
34 #include <wx/string.h>
35 #include <map>
36 #include <vector>
37 
38 class MyThes;
39 typedef std::map< wxString, std::vector< wxString > > synonyms;
40 class wxThes
41 {
42 public:
43     wxThes(const wxString idxpath, const wxString datpath);
44     virtual ~wxThes();
45 
46     synonyms Lookup(const wxString &Text);
47 
48 
49     //void CleanUpAfterLookup(mentry** pme, int nmean);
50     //char* get_th_encoding();
51     wxString GetEncoding();
52 private:
53     // Open index and dat files and load list array
54     //bool Initialize(const wxString indxpath, const wxString datpath);
55 
56     // internal close and cleanup dat and idx files
57     //bool Cleanup();
58 
59     // read a text line (\n terminated) stripping off line terminator
60     //int readLine(FILE * pf, wxString &buf, int nc);
61 
62     MyThes *m_pMT;
63 private:
64     wxThes();
65     wxThes(const wxThes &);
66     wxThes & operator = (const wxThes &);
67 };
68 
69 #endif // WXTHES_H
70