本文整理汇总了C++中TypePtr::getAMapPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ TypePtr::getAMapPointer方法的具体用法?C++ TypePtr::getAMapPointer怎么用?C++ TypePtr::getAMapPointer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypePtr
的用法示例。
在下文中一共展示了TypePtr::getAMapPointer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: kiwi_up_cast
KiwiObject kiwi_up_cast(KiwiObject obj, KiwiType type) {
TypePtr current = kiwi_icast(obj->Data->Type);
TypePtr derived = kiwi_icast(type);
// check requirement of a upper cast
if (current == derived) {
return obj;
}
// allocate new object handler and store pointers
KiwiObject parent = (KiwiObject) kiwi_malloc(sizeof(KiwiOpaqueObject));
parent->VTable = reinterpret_cast<KiwiVTable*>(current->getVTablePointer(derived));
parent->AMap = reinterpret_cast<KiwiAMap*>(current->getAMapPointer(derived));
parent->Data = obj->Data;
return parent;
}