2002-08-06 22:38:44 +00:00
|
|
|
/**
|
|
|
|
* \file WordLangTuple.h
|
|
|
|
* Copyright 2002 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author John Levon <levon@movementarian.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WORD_LANG_TUPLE_H
|
|
|
|
#define WORD_LANG_TUPLE_H
|
2002-12-01 22:59:25 +00:00
|
|
|
|
|
|
|
#include "LString.h"
|
|
|
|
|
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
|