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