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 /// clean up on messy exit
40 virtual void cleanUp() = 0;
42 /// check the given word of the given lang code and return the result
43 virtual enum Result check(WordLangTuple const &) = 0;
45 /// finish this spellchecker instance
46 virtual void close() = 0;
48 /// insert the given word into the personal dictionary
49 virtual void insert(WordLangTuple const &) = 0;
51 /// accept the given word temporarily
52 virtual void accept(WordLangTuple const &) = 0;
54 /// return the next near miss after a MISSED result
55 virtual string const nextMiss() = 0;
57 /// give an error message on messy exit
58 virtual string const error() = 0;
62 #endif // SPELL_BASE_H