本文整理汇总了C++中ObjectData::advancePack方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectData::advancePack方法的具体用法?C++ ObjectData::advancePack怎么用?C++ ObjectData::advancePack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectData
的用法示例。
在下文中一共展示了ObjectData::advancePack方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: performCleanup
//---------------------------------------------------------------------
void ObjectMemoryManager::performCleanup( ArrayMemoryManager::ManagerType managerType, uint16 level,
const MemoryPoolVec &basePtrs, size_t const *elementsMemSizes,
size_t startInstance, size_t diffInstances )
{
ObjectData objectData;
const size_t numObjs = this->getFirstObjectData( objectData, level );
size_t roundedStart = startInstance / ARRAY_PACKED_REALS;
objectData.advancePack( roundedStart );
for( size_t i=roundedStart * ARRAY_PACKED_REALS; i<numObjs; i += ARRAY_PACKED_REALS )
{
for( size_t j=0; j<ARRAY_PACKED_REALS; ++j )
{
if( objectData.mOwner[j] )
{
objectData.mIndex = j;
objectData.mOwner[j]->_getObjectData() = objectData;
}
}
objectData.advancePack();
}
}
示例2: applyRebase
//---------------------------------------------------------------------
void ObjectMemoryManager::applyRebase( ArrayMemoryManager::ManagerType managerType, uint16 level,
const MemoryPoolVec &newBasePtrs,
const ArrayMemoryManager::PtrdiffVec &diffsList )
{
ObjectData objectData;
const size_t numObjs = this->getFirstObjectData( objectData, level );
for( size_t i=0; i<numObjs; i += ARRAY_PACKED_REALS )
{
for( size_t j=0; j<ARRAY_PACKED_REALS; ++j )
{
if( objectData.mOwner[j] )
{
objectData.mIndex = j;
objectData.mOwner[j]->_getObjectData() = objectData;
}
}
objectData.advancePack();
}
}