4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
13 #include "LString.h" // can't forward declare...
19 * Base class of all spell checker implementations.
24 /// the result from checking a single word
26 OK = 1, //< word is correct
27 ROOT, //< root of given word was found
28 COMPOUNDWORD, //< word found through compound formation
29 UNKNOWN, //< word not found
30 MISSED, //< not found, with suggestions
31 IGNORE //< number of other ignored "word"
34 virtual ~SpellBase() {}
36 /// return true if the spellchecker instance still exists
37 virtual bool alive() = 0;
39 /// check the given word of the given lang code and return the result
40 virtual enum Result check(WordLangTuple const &) = 0;
42 /// insert the given word into the personal dictionary
43 virtual void insert(WordLangTuple const &) = 0;
45 /// accept the given word temporarily
46 virtual void accept(WordLangTuple const &) = 0;
48 /// return the next near miss after a MISSED result
49 virtual string const nextMiss() = 0;
51 /// give an error message on messy exit
52 virtual string const error() = 0;
56 #endif // SPELL_BASE_H