]> git.lyx.org Git - lyx.git/blob - src/WordLangTuple.h
Provide proper fallback if a bibliography processor is not found
[lyx.git] / src / WordLangTuple.h
1 // -*- C++ -*-
2 /**
3  * \file WordLangTuple.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef WORD_LANG_TUPLE_H
13 #define WORD_LANG_TUPLE_H
14
15 #include "Language.h"
16
17 #include "support/docstring.h"
18
19
20 namespace lyx {
21
22
23 /**
24  * A word and its given language.
25  * This is used for spellchecking
26  * and thesaurus.
27  */
28 class WordLangTuple {
29 public:
30         WordLangTuple() : lang_(0) {}
31
32         WordLangTuple(docstring const & w, Language const * l)
33                 : word_(w), lang_(l)
34         {}
35
36         /// return the word
37         docstring const & word() const {
38                 return word_;
39         }
40
41         /// return its language code
42         Language const * lang() const {
43                 return lang_;
44         }
45
46 private:
47         /// the word
48         docstring word_;
49         /// language of word
50         Language const * lang_;
51 };
52
53
54 } // namespace lyx
55
56 #endif // WORD_LANG_TUPLE_H