]> git.lyx.org Git - lyx.git/blob - src/WordLangTuple.h
Release children of a master if the children don't have a default master. It was...
[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 "support/docstring.h"
16
17
18 namespace lyx {
19
20
21 /**
22  * A word and its given language code ("en_US").
23  * This is used for spellchecking.
24  */
25 class WordLangTuple {
26 public:
27         WordLangTuple() {}
28
29         WordLangTuple(docstring const & w, std::string const & c)
30                 : word_(w), code_(c)
31         {}
32
33         /// return the word
34         docstring const & word() const {
35                 return word_;
36         }
37
38         /// return its language code
39         std::string const & lang_code() const {
40                 return code_;
41         }
42
43 private:
44         /// the word
45         docstring word_;
46         /// language code of word
47         std::string code_;
48 };
49
50
51 } // namespace lyx
52
53 #endif // WORD_LANG_TUPLE_H