本文整理汇总了C++中SimObject::onGroupRemove方法的典型用法代码示例。如果您正苦于以下问题:C++ SimObject::onGroupRemove方法的具体用法?C++ SimObject::onGroupRemove怎么用?C++ SimObject::onGroupRemove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimObject
的用法示例。
在下文中一共展示了SimObject::onGroupRemove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clear
void SimGroup::clear()
{
lock();
while( size() > 0 )
{
SimObject* object = objectList.last();
object->onGroupRemove();
objectList.pop_back();
mNameDictionary.remove( object );
object->mGroup = 0;
getSetModificationSignal().trigger( SetObjectRemoved, this, object );
if( object->isProperlyAdded() )
onObjectRemoved_callback( object );
if( engineAPI::gUseConsoleInterop )
object->deleteObject();
else
object->decRefCount();
}
unlock();
getSetModificationSignal().trigger( SetCleared, this, NULL );
}
示例2: popObject
void SimGroup::popObject()
{
MutexHandle handle;
handle.lock( mMutex );
if( objectList.empty() )
{
AssertWarn( false, "SimGroup::popObject - Stack underflow" );
return;
}
SimObject* object = objectList.last();
objectList.pop_back();
object->onGroupRemove();
object->mGroup = NULL;
clearNotify( object );
mNameDictionary.remove( object );
getSetModificationSignal().trigger( SetObjectAdded, this, object );
if( object->isProperlyAdded() )
onObjectRemoved_callback( object );
object->decRefCount();
}