本文整理汇总了C++中HashTable::getKey方法的典型用法代码示例。如果您正苦于以下问题:C++ HashTable::getKey方法的具体用法?C++ HashTable::getKey怎么用?C++ HashTable::getKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HashTable
的用法示例。
在下文中一共展示了HashTable::getKey方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cmpQNamesForeign
Bool Tree::cmpQNamesForeign(const QName &q, const HashTable& dictForeign, const QName &qForeign)
{
/*
printf("comparing names (%s,%s,%s) and (%s,%s,%s)\n",
(char*)(((Tree*)this)->expand(q.getPrefix())),
(char*)(((Tree*)this)->expand(q.getUri())),
(char*)(((Tree*)this)->expand(q.getLocal())),
(char*)(dictForeign.getKey(qForeign.getPrefix())),
(char*)(dictForeign.getKey(qForeign.getUri())),
(char*)(dictForeign.getKey(qForeign.getLocal()))
);
*/
if (q.getLocal() == stdPhrase(PHRASE_STAR))
{
return (Bool)(q.getPrefix() == UNDEF_PHRASE ||
(dict().getKey(q.getUri()) == dictForeign.getKey(qForeign.getUri())));
}
else
{
return (Bool)
(dict().getKey(q.getUri()) == dictForeign.getKey(qForeign.getUri()) &&
dict().getKey(q.getLocal()) == dictForeign.getKey(qForeign.getLocal()));
}
}
示例2: gbiconv_reset
void gbiconv_reset(){
for (long i=0;i<s_convTable.getNumSlots();i++){
long key = s_convTable.getKey(i);
if (!key) continue;
iconv_t conv = (iconv_t)s_convTable.getValueFromSlot(i);
if (!conv) continue;
//logf(LOG_DEBUG, "iconv: freeing iconv: 0x%x", (int)iconv);
g_mem.rmMem((void*)conv, 52, "iconv");
libiconv_close(conv);
}
s_convTable.reset();
}
示例3: set
void EQName::set(const QName& q, const HashTable& dict)
{
prefix = dict.getKey(q.getPrefix());
uri = dict.getKey(q.getUri());
local = dict.getKey(q.getLocal());
}