2003-08-23 00:17:00 +00:00
|
|
|
// -*- C++ -*-
|
2002-08-06 22:38:44 +00:00
|
|
|
/**
|
|
|
|
* \file WordLangTuple.h
|
2003-08-23 00:17:00 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-08-06 22:38:44 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-08-06 22:38:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WORD_LANG_TUPLE_H
|
|
|
|
#define WORD_LANG_TUPLE_H
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2003-10-07 08:16:04 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
2002-08-06 22:38:44 +00:00
|
|
|
/**
|
|
|
|
* A word and its given language code ("en_US").
|
|
|
|
* This is used for spellchecking.
|
|
|
|
*/
|
|
|
|
class WordLangTuple {
|
|
|
|
public:
|
2002-08-07 08:11:41 +00:00
|
|
|
WordLangTuple() {}
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
WordLangTuple(std::string const & w, std::string const & c)
|
2002-08-07 08:11:41 +00:00
|
|
|
: word_(w), code_(c)
|
|
|
|
{}
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-08-06 22:38:44 +00:00
|
|
|
/// return the word
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string const & word() const {
|
2002-08-06 22:38:44 +00:00
|
|
|
return word_;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// return its language code
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string const & lang_code() const {
|
2002-08-06 22:38:44 +00:00
|
|
|
return code_;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// the word
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string word_;
|
2002-08-06 22:38:44 +00:00
|
|
|
/// language code of word
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string code_;
|
2002-08-06 22:38:44 +00:00
|
|
|
};
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
2002-08-06 22:38:44 +00:00
|
|
|
#endif // WORD_LANG_TUPLE_H
|