]> git.lyx.org Git - lyx.git/blob - src/SpellBase.h
remove unneeded functions
[lyx.git] / src / SpellBase.h
1 // -*- C++ -*-
2 /**
3  * \file SpellBase.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef SPELL_BASE_H
14 #define SPELL_BASE_H
15
16 #include <string>
17
18 class BufferParams;
19 class WordLangTuple;
20
21 /**
22  * Base class of all spell checker implementations.
23  */
24 class SpellBase {
25 public:
26
27         /// the result from checking a single word
28         enum Result  {
29                 OK = 1, //< word is correct
30                 ROOT, //< root of given word was found
31                 COMPOUNDWORD, //< word found through compound formation
32                 UNKNOWN, //< word not found
33                 MISSED, //< not found, with suggestions
34                 IGNORE //< number of other ignored "word"
35         };
36
37         virtual ~SpellBase() {}
38
39         /// return true if the spellchecker instance still exists
40         virtual bool alive() = 0;
41
42         /// check the given word of the given lang code and return the result
43         virtual enum Result check(WordLangTuple const &) = 0;
44
45         /// insert the given word into the personal dictionary
46         virtual void insert(WordLangTuple const &) = 0;
47
48         /// accept the given word temporarily
49         virtual void accept(WordLangTuple const &) = 0;
50
51         /// return the next near miss after a MISSED result
52         virtual std::string const nextMiss() = 0;
53
54         /// give an error message on messy exit
55         virtual std::string const error() = 0;
56
57 };
58
59 #endif // SPELL_BASE_H