4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Kevin Atkinson
10 * Full author contact details are available in file CREDITS.
16 #include "SpellBase.h"
21 class PspellStringEmulation;
22 class PspellCanHaveError;
28 class PSpell : public SpellBase {
31 * Initialise the spellchecker with the given buffer params and language.
33 PSpell(BufferParams const & params, std::string const & lang);
38 * return true if the spellchecker instance still exists
39 * Always true for pspell, since there is no separate process
41 virtual bool alive() { return true; }
43 /// check the given word and return the result
44 virtual enum Result check(WordLangTuple const &);
46 /// insert the given word into the personal dictionary
47 virtual void insert(WordLangTuple const &);
49 /// accept the given word temporarily
50 virtual void accept(WordLangTuple const &);
52 /// return the next near miss after a SUGGESTED_WORDS result
53 virtual std::string const nextMiss();
55 /// give an error message on messy exit
56 virtual std::string const error();
59 /// add a manager of the given language
60 void addManager(std::string const & lang);
63 PspellManager * manager;
64 PspellConfig * config;
67 typedef std::map<std::string, struct Manager> Managers;
73 PspellStringEmulation * els;
75 PspellCanHaveError * spell_error_object;
78 #endif // LYX_PSPELL_H