コード例 #1
0
bool
NativeLookupTable::append_entry (const Phrase& entry)
{
    if (entry.is_enable ()) {
        m_phrases.push_back (entry);
        return true;
    }
    return false;
}
コード例 #2
0
ファイル: scim_pinyin_phrase.cpp プロジェクト: wwood/scim
Phrase
PinyinPhraseLib::append (const Phrase &phrase, const PinyinKeyVector &keys)
{
	if (!phrase.valid () || !valid ())
		return Phrase ();

	Phrase tmp = m_phrase_lib.find (phrase);

	if (tmp.valid () && tmp.is_enable ())
		return tmp;

	tmp = m_phrase_lib.append (phrase);

	if (!tmp.valid () || !tmp.is_enable ())
		return Phrase ();

	insert_phrase_into_index (tmp, keys);
	return tmp;
}