本文整理汇总了C++中CClientEntity::IsStreamingCompatibleClass方法的典型用法代码示例。如果您正苦于以下问题:C++ CClientEntity::IsStreamingCompatibleClass方法的具体用法?C++ CClientEntity::IsStreamingCompatibleClass怎么用?C++ CClientEntity::IsStreamingCompatibleClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CClientEntity
的用法示例。
在下文中一共展示了CClientEntity::IsStreamingCompatibleClass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetEntitiesFromRoot
void CClientEntity::GetEntitiesFromRoot ( unsigned int uiTypeHash, CLuaMain* pLuaMain, bool bStreamedIn )
{
#if CHECK_ENTITIES_FROM_ROOT
_CheckEntitiesFromRoot ( uiTypeHash );
#endif
t_mapEntitiesFromRoot::iterator find = ms_mapEntitiesFromRoot.find ( uiTypeHash );
if ( find != ms_mapEntitiesFromRoot.end () )
{
std::list < CClientEntity* >& listEntities = find->second;
CClientEntity* pEntity;
lua_State* luaVM = pLuaMain->GetVirtualMachine ();
unsigned int uiIndex = 0;
for ( std::list < CClientEntity* >::const_reverse_iterator i = listEntities.rbegin ();
i != listEntities.rend ();
++i )
{
pEntity = *i;
// Only streamed in elements?
if ( !bStreamedIn || !pEntity->IsStreamingCompatibleClass() ||
reinterpret_cast < CClientStreamElement* > ( pEntity )->IsStreamedIn() )
{
// Add it to the table
lua_pushnumber ( luaVM, ++uiIndex );
lua_pushelement ( luaVM, pEntity );
lua_settable ( luaVM, -3 );
}
}
}
}
示例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() )
{
// Add it to the table
lua_pushnumber ( luaVM, ++uiIndex );
pEntity->PushStack( luaVM );
lua_settable ( luaVM, -3 );
}
}
}
}