本文整理汇总了C++中RuntimeType::consistencyCheck方法的典型用法代码示例。如果您正苦于以下问题:C++ RuntimeType::consistencyCheck方法的具体用法?C++ RuntimeType::consistencyCheck怎么用?C++ RuntimeType::consistencyCheck使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RuntimeType
的用法示例。
在下文中一共展示了RuntimeType::consistencyCheck方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
RuntimeType
RuntimeType::setKnownClass(const Class* klass) const {
assert(isObject());
RuntimeType rtt;
rtt.m_kind = VALUE;
rtt.m_value.outerType = outerType();
rtt.m_value.klass = m_value.klass;
rtt.m_value.knownClass = klass;
rtt.consistencyCheck();
return rtt;
}
示例2: assert
RuntimeType
RuntimeType::setArrayKind(ArrayData::ArrayKind arrayKind) const {
assert(isArray() || (isRef() && innerType() == KindOfArray));
RuntimeType rtt;
rtt.m_kind = this->m_kind;
rtt.m_value.outerType = outerType();
rtt.m_value.innerType = innerType();
rtt.m_value.arrayKindValid = true;
rtt.m_value.arrayKind = arrayKind;
rtt.consistencyCheck();
return rtt;
}
示例3: unbox
RuntimeType RuntimeType::unbox() const {
assert(m_kind == VALUE);
if (m_value.outerType != KindOfRef) {
consistencyCheck();
return *this;
}
RuntimeType rtt;
rtt.m_value.outerType = m_value.innerType;
rtt.m_value.innerType = KindOfInvalid;
rtt.consistencyCheck();
return rtt;
}
示例4: box
RuntimeType RuntimeType::box() const {
ASSERT(m_kind == VALUE);
if (m_value.outerType == KindOfRef) {
consistencyCheck();
return *this;
}
RuntimeType rtt;
rtt.m_value.outerType = KindOfRef;
rtt.m_value.innerType = m_value.outerType;
rtt.consistencyCheck();
return rtt;
}
示例5: assert
RuntimeType
RuntimeType::setKnownClass(const Class* klass) const {
assert(isObject() || (isRef() && innerType() == KindOfObject));
RuntimeType rtt;
rtt.m_kind = this->m_kind;
rtt.m_value.outerType = outerType();
rtt.m_value.innerType = innerType();
rtt.m_value.klass = m_value.klass;
rtt.m_value.knownClass = klass;
rtt.consistencyCheck();
return rtt;
}