3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author Kevin Atkinson
7 * \author John Levon <levon@movementarian.org>
15 #include "SpellBase.h"
18 class PspellStringEmulation;
19 class PspellCanHaveError;
25 class PSpell : public SpellBase {
28 * Initialise the spellchecker with the given buffer params and language.
30 PSpell(BufferParams const & params, string const & lang);
35 * return true if the spellchecker instance still exists
36 * Always true for pspell, since there is no separate process
38 virtual bool alive() { return true; }
40 /// clean up on messy exit
41 virtual void cleanUp();
43 /// check the given word and return the result
44 virtual enum Result check(WordLangTuple const &);
46 /// finish this spellchecker instance
49 /// insert the given word into the personal dictionary
50 virtual void insert(WordLangTuple const &);
52 /// accept the given word temporarily
53 virtual void accept(WordLangTuple const &);
55 /// return the next near miss after a MISSED result
56 virtual string const nextMiss();
58 /// give an error message on messy exit
59 virtual string const error();
62 /// add a manager of the given language
63 void addManager(string const & lang);
66 PspellManager * manager;
67 PspellConfig * config;
70 typedef std::map<string, struct Manager> Managers;
76 PspellStringEmulation * els;
78 PspellCanHaveError * spell_error_object;