本文整理汇总了C++中CClientEntity::IsBeingDeleted方法的典型用法代码示例。如果您正苦于以下问题:C++ CClientEntity::IsBeingDeleted方法的具体用法?C++ CClientEntity::IsBeingDeleted怎么用?C++ CClientEntity::IsBeingDeleted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CClientEntity
的用法示例。
在下文中一共展示了CClientEntity::IsBeingDeleted方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _GetEntitiesFromRoot
void CClientEntity::_GetEntitiesFromRoot ( unsigned int uiTypeHash, std::map < CClientEntity*, int >& mapResults )
{
t_mapEntitiesFromRoot::iterator find = ms_mapEntitiesFromRoot.find ( uiTypeHash );
if ( find != ms_mapEntitiesFromRoot.end () )
{
const std::list < CClientEntity* >& listEntities = find->second;
CClientEntity* pEntity;
unsigned int uiIndex = 0;
for ( std::list < CClientEntity* >::const_reverse_iterator i = listEntities.rbegin ();
i != listEntities.rend ();
++i )
{
pEntity = *i;
assert ( pEntity );
ElementID ID = pEntity->GetID ();
assert ( ID != INVALID_ELEMENT_ID );
assert ( pEntity == CElementIDs::GetElement ( ID ) );
if ( pEntity->IsBeingDeleted () )
OutputDebugString ( SString ( "Client: 0x%08x %s is flagged as IsBeingDeleted() but is still in GetEntitiesFromRoot\n", pEntity, pEntity->GetTypeName () ) );
assert ( mapResults.find ( pEntity ) == mapResults.end () );
mapResults [ pEntity ] = 1;
}
}
}
示例2: GetEntitiesFromRoot
void CClientEntity::GetEntitiesFromRoot ( unsigned int uiTypeHash, lua_State* luaVM, bool bStreamedIn )
{
#if CHECK_ENTITIES_FROM_ROOT
_CheckEntitiesFromRoot ( uiTypeHash );
#endif
t_mapEntitiesFromRoot::iterator find = ms_mapEntitiesFromRoot.find ( uiTypeHash );
if ( find != ms_mapEntitiesFromRoot.end () )
{
CFromRootListType& listEntities = find->second;
CClientEntity* pEntity;
unsigned int uiIndex = 0;
for ( CFromRootListType::reverse_iterator i = listEntities.rbegin ();
i != listEntities.rend ();
++i )
{
pEntity = *i;
// Only streamed in elements?
if ( !bStreamedIn || !pEntity->IsStreamingCompatibleClass() ||
reinterpret_cast < CClientStreamElement* > ( pEntity )->IsStreamedIn() )
{
if ( !pEntity->IsBeingDeleted ( ) )
{
// Add it to the table
lua_pushnumber ( luaVM, ++uiIndex );
lua_pushelement ( luaVM, pEntity );
lua_settable ( luaVM, -3 );
}
}
}
}
}
示例3: CallEventNoParent
void CClientEntity::CallEventNoParent ( const char* szName, const CLuaArguments& Arguments, CClientEntity* pSource )
{
// Call it on us if this isn't the same class it was raised on
//TODO not sure why the null check is necessary (eAi)
if ( pSource != this && m_pEventManager != NULL && m_pEventManager->HasEvents () )
{
m_pEventManager->Call ( szName, Arguments, pSource, this );
}
// Call it on all our children
if ( ! m_Children.empty () )
{
CElementListSnapshot* pList = GetChildrenListSnapshot();
pList->AddRef(); // Keep list alive during use
for ( CElementListSnapshot::const_iterator iter = pList->begin() ; iter != pList->end() ; iter++ )
{
CClientEntity* pEntity = *iter;
if ( !pEntity->IsBeingDeleted() )
{
if ( !pEntity->m_pEventManager || pEntity->m_pEventManager->HasEvents () || !pEntity->m_Children.empty () )
{
pEntity->CallEventNoParent ( szName, Arguments, pSource );
if ( m_bBeingDeleted )
break;
}
}
}
pList->Release();
}
}
示例4: lua_toelement
CClientEntity* lua_toelement ( lua_State* luaVM, int iArgument )
{
if ( lua_type ( luaVM, iArgument ) == LUA_TLIGHTUSERDATA )
{
ElementID ID = TO_ELEMENTID ( lua_touserdata ( luaVM, iArgument ) );
CClientEntity* pEntity = CElementIDs::GetElement ( ID );
if ( !pEntity || pEntity->IsBeingDeleted () )
return NULL;
return pEntity;
}
else if ( lua_type ( luaVM, iArgument ) == LUA_TUSERDATA )
{
ElementID ID = TO_ELEMENTID ( * ( ( void ** ) lua_touserdata ( luaVM, iArgument ) ) );
CClientEntity* pEntity = CElementIDs::GetElement ( ID );
if ( !pEntity || pEntity->IsBeingDeleted () )
return NULL;
return pEntity;
}
return NULL;
}
示例5: FlushQueuedUpdates
void CClientGUIManager::FlushQueuedUpdates()
{
map<ElementID, bool>::iterator iter = m_QueuedGridListUpdates.begin();
for (; iter != m_QueuedGridListUpdates.end(); ++iter)
{
CClientEntity* pEntity = CElementIDs::GetElement(iter->first);
if (pEntity && !pEntity->IsBeingDeleted() && pEntity->GetType() == CCLIENTGUI)
{
CClientGUIElement* pGUIElement = static_cast<CClientGUIElement*>(pEntity);
if (pGUIElement && IS_CGUIELEMENT_GRIDLIST(pGUIElement))
{
CGUIGridList* pGUIGridList = static_cast<CGUIGridList*>(pGUIElement->GetCGUIElement());
pGUIGridList->ForceUpdate();
}
}
}
m_QueuedGridListUpdates.clear();
}