コード例 #1
0
ファイル: sunpinyin_engine.cpp プロジェクト: XueWei/sunpinyin
void
SunPinyinEngine::update_charset_level()
{
    unsigned charset = m_config.get(CONFIG_GENERAL_CHARSET_LEVEL, GBK);
    CIMIContext* ic = m_pv->getIC();
    assert(ic);
    charset &= 3;               // charset can only be 0,1,2 or 3
    ic->setCharsetLevel(charset);
}
コード例 #2
0
ファイル: imi_options.cpp プロジェクト: epico/sunpinyin
CIMIContext *
CSimplifiedChinesePolicy::createContext()
{
    CIMIContext* pic = new CIMIContext ();
    pic->setCoreData (&m_coreData);
    pic->setHistoryMemory (&m_historyCache);
    pic->setUserDict (&m_userDict);

    pic->setCharsetLevel (m_csLevel);

    pic->setFullSymbolForwarding (m_bEnableFullSymbol);
    pic->setGetFullSymbolOp (&m_getFullSymbolOp);

    pic->setFullPunctForwarding (m_bEnableFullPunct);
    pic->setGetFullPunctOp (&m_getFullPunctOp);
    return pic;
}
コード例 #3
0
ファイル: lang_policy_cn_xh.cpp プロジェクト: wjcdx/sunpinyin
CIMIContext *
CXhSimplifiedChinesePolicy::createContext()
{
    CIMIContext* pic = new CIMIContext();
    
	CInputTrieSource* ipt = new CInputTrieSource();
	ipt->setUserDict(&m_userDict);
	pic->setInputTrieSource(ipt);

	pic->setCoreData(&m_coreData);
    pic->setCharsetLevel(m_csLevel);
	pic->setHistoryMemory(&m_historyCache);

	CFullCharManager::setFullSymbolForwarding(m_bEnableFullSymbol);
	CFullCharManager::setGetFullSymbolOp(&m_getFullSymbolOp);

	CFullCharManager::setFullPunctForwarding(m_bEnableFullPunct);
	CFullCharManager::setGetFullPunctOp(&m_getFullPunctOp);
    return pic;
}