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-09-05 17:23:11 +00:00
|
|
|
#include "support/std_string.h"
|
2002-12-01 22:59:25 +00:00
|
|
|
|
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
|
|
|
|
2002-08-06 22:38:44 +00:00
|
|
|
WordLangTuple(string const & w, 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
|
2002-08-13 14:40:38 +00:00
|
|
|
string const & word() const {
|
2002-08-06 22:38:44 +00:00
|
|
|
return word_;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// return its language code
|
2002-08-13 14:40:38 +00:00
|
|
|
string const & lang_code() const {
|
2002-08-06 22:38:44 +00:00
|
|
|
return code_;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// the word
|
|
|
|
string word_;
|
|
|
|
/// language code of word
|
|
|
|
string code_;
|
|
|
|
};
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-08-06 22:38:44 +00:00
|
|
|
#endif // WORD_LANG_TUPLE_H
|