* lyx_1_6.py:
[lyx.git] / src / Thesaurus.h
blob9808a455ff49ab683e31734f39644553d9178ad0
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.
7 * \author John Levon
8 * \author Jürgen Spitzmüller
10 * Full author contact details are available in file CREDITS.
13 #ifndef THESAURUS_H
14 #define THESAURUS_H
16 #include "support/docstring.h"
18 #include <vector>
19 #include <map>
20 #include <string>
22 #ifdef HAVE_LIBMYTHES
23 #include MYTHES_H_LOCATION
24 #else
25 #ifdef HAVE_LIBAIKSAURUS
26 #include AIKSAURUS_H_LOCATION
27 #endif // HAVE_LIBAIKSAURUS
28 #endif // !HAVE_LIBMYTHES
30 namespace lyx {
32 /**
33 * This class provides an interface to whatever thesauri we might support.
36 class Thesaurus
38 public:
39 ///
40 Thesaurus();
41 ///
42 ~Thesaurus();
44 typedef std::map<docstring, std::vector<docstring> > Meanings;
46 /**
47 * look up some text in the thesaurus
49 Meanings lookup(docstring const & text, docstring const & lang);
50 /// check if a thesaurus for a given language \p lang is available
51 bool thesaurusAvailable(docstring const & lang) const;
53 private:
54 #ifdef HAVE_LIBMYTHES
55 /// add a thesaurus to the list
56 bool addThesaurus(docstring const & lang);
58 typedef std::map<docstring, MyThes *> Thesauri;
59 /// the thesauri
60 Thesauri thes_;
61 #else
62 #ifdef HAVE_LIBAIKSAURUS
63 Aiksaurus * thes_;
64 #endif // HAVE_LIBAIKSAURUS
65 #endif // !HAVE_LIBMYTHES
68 extern Thesaurus thesaurus;
71 } // namespace lyx
73 #endif