]> git.lyx.org Git - lyx.git/blob - src/WordLangTuple.h
Fix event loop to no longer eat CPU
[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 <string>
16
17
18 /**
19  * A word and its given language code ("en_US").
20  * This is used for spellchecking.
21  */
22 class WordLangTuple {
23 public:
24         WordLangTuple() {}
25
26         WordLangTuple(std::string const & w, std::string const & c)
27                 : word_(w), code_(c)
28         {}
29
30         /// return the word
31         std::string const & word() const {
32                 return word_;
33         }
34
35         /// return its language code
36         std::string const & lang_code() const {
37                 return code_;
38         }
39
40 private:
41         /// the word
42         std::string word_;
43         /// language code of word
44         std::string code_;
45 };
46
47 #endif // WORD_LANG_TUPLE_H