]> git.lyx.org Git - lyx.git/blob - src/Thesaurus.h
John's Layout Tabular UI improvements and Martins fixes to clearing the
[lyx.git] / src / Thesaurus.h
1 // -*- C++ -*-
2 /**
3  * \file Thesaurus.h
4  * Copyright 2001 the LyX Team
5  * Read the file COPYING
6  *
7  * \author John Levon
8  */
9
10 #ifndef THESAURUS_H
11 #define THESAURUS_H
12  
13 #include <vector>
14  
15 #include "LString.h"
16 #ifdef HAVE_LIBAIKSAURUS
17 #include "AikSaurus.h"
18 #endif
19  
20 /**
21  * This class provides an interface to whatever thesauri we might support.
22  */
23
24 class Thesaurus {
25 public:
26         ///
27         Thesaurus();
28         ///
29         ~Thesaurus();
30
31         /**
32          * enum of possible part of speech types
33          */
34         enum POS {
35                 NONE = 0x0,
36                 OTHER = 0x01,
37                 NOUN = 0x02,
38                 VERB = 0x04,
39                 ADJECTIVE = 0x08,
40                 ADVERB = 0x10
41         };
42
43         /**
44          * an individual entry from the thesaurus 
45          */
46         struct ThesaurusEntry {
47                 /// 
48                 ThesaurusEntry(const string & ent, char pos); 
49                 /// the actual entry 
50                 string entry;
51                 /// entry's part of speech
52                 int pos;
53         };
54
55         /**
56          * look up some text in the thesaurus
57          */
58         std::vector<ThesaurusEntry> lookup(string const & text);
59
60 private:
61 #ifdef HAVE_LIBAIKSAURUS
62         AikSaurus * aik_;
63 #endif
64 };
65  
66 extern Thesaurus thesaurus;
67  
68 #endif