4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
16 #include "LString.h" // can't forward declare...
22 * Base class of all spell checker implementations.
27 /// the result from checking a single word
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"
37 virtual ~SpellBase() {}
39 /// return true if the spellchecker instance still exists
40 virtual bool alive() = 0;
42 /// check the given word of the given lang code and return the result
43 virtual enum Result check(WordLangTuple const &) = 0;
45 /// insert the given word into the personal dictionary
46 virtual void insert(WordLangTuple const &) = 0;
48 /// accept the given word temporarily
49 virtual void accept(WordLangTuple const &) = 0;
51 /// return the next near miss after a MISSED result
52 virtual string const nextMiss() = 0;
54 /// give an error message on messy exit
55 virtual string const error() = 0;
59 #endif // SPELL_BASE_H