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 "SpellBase.h"
18 #include "support/docstring.h"
20 #include <boost/scoped_ptr.hpp>
28 namespace support { class ForkedProcess; }
30 /// i/a spell process-based spellchecker
31 class ISpell : public SpellBase {
33 ISpell(BufferParams const & params, std::string const & lang);
37 /// return true if the spellchecker instance still exists
40 /// check the given word and return the result
41 virtual enum Result check(WordLangTuple const & word);
43 /// insert the given word into the personal dictionary
44 virtual void insert(WordLangTuple const & word);
46 /// accept the given word temporarily
47 virtual void accept(WordLangTuple const & word);
49 /// return the next near miss after a SUGGESTED_WORDS result
50 virtual std::string const nextMiss();
52 /// give an error message on messy exit
53 virtual docstring const error();
56 /// read some data. Returns true on an error. Sets err_read
57 /// to true if the data was from stderr.
58 bool select(bool & err_read);
60 /// instream to communicate with ispell
62 /// outstream to communicate with ispell
64 /// errstream for ispell
72 /// buffer for reading
78 boost::scoped_ptr<support::ForkedProcess> child_;
80 // vileness below ... please FIXME