本文整理汇总了C++中Traits::needsHashtable方法的典型用法代码示例。如果您正苦于以下问题:C++ Traits::needsHashtable方法的具体用法?C++ Traits::needsHashtable怎么用?C++ Traits::needsHashtable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Traits
的用法示例。
在下文中一共展示了Traits::needsHashtable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/*static*/ CreateInstanceProc FASTCALL ClassClosure::checkForRestrictedInheritance(VTable* ivtable, CreateInstanceProc p)
{
if (ivtable)
{
Traits* itraits = ivtable->traits;
if (p == ArrayClass::createInstanceProc && !itraits->needsHashtable())
{
// If we are a sealed subclass of Array, we want to check BugCompatibility
// to see if instances of this class should behave as "semisealed" instead.
if (!itraits->core->currentBugCompatibility()->bugzilla654807)
{
return SemiSealedArrayObject::createInstanceProc;
}
}
// Bugzilla 688486: if this is unsubclassed array, let it be simple.
if (itraits == itraits->core->traits.array_itraits)
{
return ArrayClass::createUnsubclassedInstanceProc;
}
Traits* base = itraits->base;
if (base != NULL && base->isRestrictedInheritance && base->pool != itraits->pool)
{
return ClassClosure::cantInstantiateCreateInstanceProc;
}
}
return p;
}
示例2: isDynamic
bool DomainObject::isDynamic (Atom a)
{
Traits *traits = getTraits(a);
if (traits->itraits != NULL) {
traits = traits->itraits;
}
return traits->needsHashtable();
}