]> git.lyx.org Git - lyx.git/blob - src/ASpell_local.h
Speed up FileName operator== (Georg's solution).
[lyx.git] / src / ASpell_local.h
1 // -*- C++ -*-
2 /**
3  * \file ASpell_local.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Kevin Atkinson
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef LYX_ASPELL_H
14 #define LYX_ASPELL_H
15
16 #include "SpellChecker.h"
17
18 #include <map>
19 #include <string>
20
21 struct AspellSpeller;
22 struct AspellStringEnumeration;
23 struct AspellCanHaveError;
24 struct AspellConfig;
25
26 namespace lyx {
27
28
29 class ASpell : public SpellChecker
30 {
31 public:
32         ASpell();
33         ~ASpell();
34
35         /// check the given word and return the result
36         enum Result check(WordLangTuple const &);
37
38         /// insert the given word into the personal dictionary
39         void insert(WordLangTuple const &);
40
41         /// accept the given word temporarily
42         void accept(WordLangTuple const &);
43
44         /// return the next near miss after a SUGGESTED_WORDS result
45         docstring const nextMiss();
46
47         /// give an error message on messy exit
48         docstring const error();
49
50 private:
51         /// add a speller of the given language
52         void addSpeller(std::string const & lang);
53
54         struct Speller {
55                 AspellSpeller * speller;
56                 AspellConfig * config;
57         };
58
59         typedef std::map<std::string, Speller> Spellers;
60
61         /// the spellers
62         Spellers spellers_;
63
64         /// FIXME
65         AspellStringEnumeration * els;
66         /// FIXME
67         AspellCanHaveError * spell_error_object;
68 };
69
70
71 } // namespace lyx
72
73 #endif // LYX_ASPELL_H