]> git.lyx.org Git - lyx.git/blob - src/Thesaurus.h
Fix bug 3522.
[lyx.git] / src / Thesaurus.h
1 // -*- C++ -*-
2 /**
3  * \file Thesaurus.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef THESAURUS_H
13 #define THESAURUS_H
14
15 #include "support/docstring.h"
16
17 #include <vector>
18 #include <map>
19
20 #ifdef HAVE_LIBMYTHES
21 #include MYTHES_H_LOCATION
22 #else
23 #ifdef HAVE_LIBAIKSAURUS
24 #include AIKSAURUS_H_LOCATION
25 #endif // HAVE_LIBAIKSAURUS
26 #endif // !HAVE_LIBMYTHES
27
28 namespace lyx {
29
30 /**
31  * This class provides an interface to whatever thesauri we might support.
32  */
33
34 class Thesaurus {
35 public:
36         ///
37         Thesaurus();
38         ///
39         ~Thesaurus();
40
41         typedef std::map<docstring, std::vector<docstring> > Meanings;
42
43         /**
44          * look up some text in the thesaurus
45          */
46         Meanings lookup(docstring const & text);
47
48 private:
49 #ifdef HAVE_LIBMYTHES
50         MyThes * thes_;
51 #else
52 #ifdef HAVE_LIBAIKSAURUS
53         Aiksaurus * thes_;
54 #endif // HAVE_LIBAIKSAURUS
55 #endif // !HAVE_LIBMYTHES
56 };
57
58 extern Thesaurus thesaurus;
59
60
61 } // namespace lyx
62
63 #endif