]> git.lyx.org Git - lyx.git/blob - src/Thesaurus.h
tex2lyx/Preamble.cpp: forgot a package in previous commit
[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  * \author Jürgen Spitzmüller
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef THESAURUS_H
14 #define THESAURUS_H
15
16 #include "support/docstring.h"
17 #include "WordLangTuple.h"
18
19 #include <map>
20 #include <vector>
21
22 namespace lyx {
23
24 /**
25  * This class provides an interface to whatever thesauri we might support.
26  */
27
28 class Thesaurus
29 {
30 public:
31         ///
32         Thesaurus();
33         ///
34         ~Thesaurus();
35
36         typedef std::map<docstring, std::vector<docstring> > Meanings;
37
38         /**
39          * look up some text in the thesaurus
40          */
41         Meanings lookup(WordLangTuple const & wl);
42         /** check if a thesaurus for a given language \p lang is available
43          *  (installed and loaded)
44          */
45         bool thesaurusAvailable(docstring const & lang) const;
46         /// check if a thesaurus for a given language \p lang is installed
47         bool thesaurusInstalled(docstring const & lang) const;
48
49 private:
50         struct Private;
51         Private * const d;
52 };
53
54 extern Thesaurus thesaurus;
55
56
57 } // namespace lyx
58
59 #endif