4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
13 #include "LString.h" // can't forward declare...
18 * Base class of all spell checker implementations.
23 /// the result from checking a single word
25 OK = 1, //< word is correct
26 ROOT, //< root of given word was found
27 COMPOUNDWORD, //< word found through compound formation
28 UNKNOWN, //< word not found
29 MISSED, //< not found, with suggestions
30 IGNORE //< number of other ignored "word"
33 virtual ~SpellBase() {}
35 /// return true if the spellchecker instance still exists
36 virtual bool alive() = 0;
38 /// clean up on messy exit
39 virtual void cleanUp() = 0;
41 /// check the given word and return the result
42 virtual enum Result check(string const &) = 0;
44 /// finish this spellchecker instance
45 virtual void close() = 0;
47 /// insert the given word into the personal dictionary
48 virtual void insert(string const &) = 0;
50 /// accept the given word temporarily
51 virtual void accept(string const &) = 0;
53 /// return the next near miss after a MISSED result
54 virtual string const nextMiss() = 0;
56 /// give an error message on messy exit
57 virtual string const error() = 0;
61 #endif // SPELL_BASE_H