]> git.lyx.org Git - lyx.git/blob - src/WordLangTuple.h
Make the fake sequence for braces highly unlikely (addressing #6478).
[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  * plus a variety if needed.
24  * This is used for spellchecking.
25  */
26 class WordLangTuple {
27 public:
28         WordLangTuple() {}
29
30         WordLangTuple(docstring const & w, std::string const & c,
31                       std::string const & v = std::string())
32                 : word_(w), code_(c), variety_(v)
33         {}
34
35         /// return the word
36         docstring const & word() const {
37                 return word_;
38         }
39
40         /// return its language code
41         std::string const & lang_code() const {
42                 return code_;
43         }
44
45         /// return the language variety
46         std::string const & lang_variety() const {
47                 return variety_;
48         }
49
50 private:
51         /// the word
52         docstring word_;
53         /// language code of word
54         std::string code_;
55         /// language variety of word
56         std::string variety_;
57 };
58
59
60 } // namespace lyx
61
62 #endif // WORD_LANG_TUPLE_H