当前位置: 首页>>代码示例>>C++>>正文


C++ CUtlDict::First方法代码示例

本文整理汇总了C++中CUtlDict::First方法的典型用法代码示例。如果您正苦于以下问题:C++ CUtlDict::First方法的具体用法?C++ CUtlDict::First怎么用?C++ CUtlDict::First使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUtlDict的用法示例。


在下文中一共展示了CUtlDict::First方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DebugPrintUsedTextures

void CTextureManager::DebugPrintUsedTextures( void )
{
	for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = m_TextureList.Next( i ) )
	{
		ITextureInternal *pTexture = m_TextureList[i];
		Msg( "Texture: '%s' RefCount: %d\n", pTexture->GetName(), pTexture->GetReferenceCount() );
	}

	if ( m_TextureExcludes.Count() )
	{
		Msg( "\nExcluded Textures: (%d)\n", m_TextureExcludes.Count() );
		for ( int i = m_TextureExcludes.First(); i != m_TextureExcludes.InvalidIndex(); i = m_TextureExcludes.Next( i ) )
		{
			char buff[256];
			const char *pName = m_TextureExcludes.GetElementName( i );
			V_snprintf( buff, sizeof( buff ), "Excluded: %d '%s' \n", m_TextureExcludes[i], pName );
	
			// an excluded texture is valid, but forced tiny
			if ( IsTextureLoaded( pName ) )
			{
				Msg( buff );
			}
			else
			{
				// warn as unknown, could be a spelling error
				Warning( buff );
			}
		}
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:30,代码来源:texturemanager.cpp

示例2: ResetTextureFilteringState

void CTextureManager::ResetTextureFilteringState( )
{
	for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = m_TextureList.Next( i ) )
	{
		m_TextureList[i]->SetFilteringAndClampingMode();
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:7,代码来源:texturemanager.cpp

示例3: UpdateExcludedTextures

void CTextureManager::UpdateExcludedTextures( void )
{
	for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = m_TextureList.Next( i ) )
	{
		m_TextureList[i]->UpdateExcludedState();
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:7,代码来源:texturemanager.cpp

示例4: ReloadTextures

//-----------------------------------------------------------------------------
// Reloads all textures
//-----------------------------------------------------------------------------
void CTextureManager::ReloadTextures()
{
	for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = m_TextureList.Next( i ) )
	{
		// Put the texture back onto the board
		m_TextureList[i]->Download();
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:11,代码来源:texturemanager.cpp

示例5: ResetTriggerFactoryDatabase

void ResetTriggerFactoryDatabase( void )
{
	for ( int i=m_TriggerFactoryDatabase.First(); i != m_TriggerFactoryDatabase.InvalidIndex(); i=m_TriggerFactoryDatabase.Next( i ) )
	{
		delete m_TriggerFactoryDatabase[ i ];
	}
	m_TriggerFactoryDatabase.RemoveAll();
}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:8,代码来源:basescriptedtrigger.cpp

示例6: ClearKeyValuesCache

void ClearKeyValuesCache()
{
	MEM_ALLOC_CREDIT();
	for ( int i=g_KeyValuesCache.First(); i != g_KeyValuesCache.InvalidIndex(); i=g_KeyValuesCache.Next( i ) )
	{
		g_KeyValuesCache[i]->deleteThis();
	}
	g_KeyValuesCache.Purge();
}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:9,代码来源:c_vguiscreen.cpp

示例7: ReleaseTextures

//-----------------------------------------------------------------------------
// Releases all textures (cause we've lost video memory)
//-----------------------------------------------------------------------------
void CTextureManager::ReleaseTextures( void )
{
	g_pShaderAPI->SetFullScreenTextureHandle( INVALID_SHADERAPI_TEXTURE_HANDLE );

	for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = m_TextureList.Next( i ) )
	{
		// Release the texture...
		m_TextureList[i]->Release();
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:13,代码来源:texturemanager.cpp

示例8: ReloadFilesInList

void CTextureManager::ReloadFilesInList( IFileList *pFilesToReload )
{
	if ( !IsPC() )
		return;

	for ( int i=m_TextureList.First(); i != m_TextureList.InvalidIndex(); i=m_TextureList.Next( i ) )
	{
		ITextureInternal *pTex = m_TextureList[i];

		pTex->ReloadFilesInList( pFilesToReload );
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:12,代码来源:texturemanager.cpp

示例9: RestoreNonRenderTargetTextures

//-----------------------------------------------------------------------------
// Restore all textures (cause we've got video memory again)
//-----------------------------------------------------------------------------
void CTextureManager::RestoreNonRenderTargetTextures( )
{
	// 360 should not have gotten here
	Assert( !IsX360() );

	for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = m_TextureList.Next( i ) )
	{
		if ( !m_TextureList[i]->IsRenderTarget() )
		{
			RestoreTexture( m_TextureList[i] );
		}
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:16,代码来源:texturemanager.cpp

示例10: ResetEntityFactoryDatabase

void ResetEntityFactoryDatabase( void )
{
#ifdef CLIENT_DLL
#ifdef LUA_SDK
	GetClassMap().RemoveAllScripted();
#endif
#else
	for ( int i=m_EntityFactoryDatabase.First(); i != m_EntityFactoryDatabase.InvalidIndex(); i=m_EntityFactoryDatabase.Next( i ) )
	{
		delete m_EntityFactoryDatabase[ i ];
	}
	m_EntityFactoryDatabase.RemoveAll();
#endif
}
开发者ID:WorldGamers,项目名称:Mobile-Forces-Source,代码行数:14,代码来源:basescripted.cpp

示例11: RemoveTexture

void CTextureManager::RemoveTexture( ITextureInternal *pTexture )
{
	Assert( pTexture->GetReferenceCount() <= 0 );

	for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = m_TextureList.Next( i ) )
	{
		// search by object
		if ( m_TextureList[i] == pTexture )
		{
			ITextureInternal::Destroy( m_TextureList[i] );
			m_TextureList.RemoveAt( i );
			break;
		}
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:15,代码来源:texturemanager.cpp

示例12: LoadMetaClassDefinitionFile

//-----------------------------------------------------------------------------
// Loads up a file containing metaclass definitions
//-----------------------------------------------------------------------------
void CPanelMetaClassMgrImp::LoadMetaClassDefinitionFile( const char *pFileName )
{
	MEM_ALLOC_CREDIT();

	// Blat out previous metaclass definitions read in from this file...
	int i = m_MetaClassKeyValues.Find( pFileName );
	if (i != m_MetaClassKeyValues.InvalidIndex() )
	{
		// Blow away the previous keyvalues	from that file
		unsigned short j = m_MetaClassDict.First();
		while ( j != m_MetaClassDict.InvalidIndex() )
		{
			unsigned short next = m_MetaClassDict.Next(j);
			if ( m_MetaClassDict[j].m_KeyValueIndex == i)
			{
				m_MetaClassDict.RemoveAt(j);
			}

			j = next;
		}

		m_MetaClassKeyValues[i]->deleteThis();
		m_MetaClassKeyValues.RemoveAt(i); 
	}

	// Create a new keyvalues entry
	KeyValues* pKeyValues = new KeyValues(pFileName);
	int idx = m_MetaClassKeyValues.Insert( pFileName, pKeyValues );

	// Read in all metaclass definitions...

	// Load the file
	if ( !pKeyValues->LoadFromFile( filesystem, pFileName ) )
	{
		Warning( "Couldn't find metaclass definition file %s\n", pFileName );
		pKeyValues->deleteThis();
		m_MetaClassKeyValues.RemoveAt(idx);
		return;
	}
	else
	{
		// Go ahead and parse the data now
		if ( !ParseMetaClassList( pFileName, pKeyValues, idx ) )
		{
			Warning( "Detected one or more errors parsing %s\n", pFileName );
		}
	}
}
开发者ID:newroob,项目名称:bg2-2007,代码行数:51,代码来源:panelmetaclassmgr.cpp

示例13: FindFactory

DISPATCHFUNCTION CClassMap::FindFactory( const char *classname )
{
	for ( int i=m_ClassDict.First(); i != m_ClassDict.InvalidIndex(); i=m_ClassDict.Next( i ) )
	{
		classentry_t *lookup = &m_ClassDict[ i ];
		if ( !lookup )
			continue;

		if ( Q_stricmp( lookup->GetMapName(), classname ) )
			continue;

		return lookup->factory;
	}

	return NULL;
}
开发者ID:WorldGamers,项目名称:Mobile-Forces-Source,代码行数:16,代码来源:classmap.cpp

示例14: ReleaseTempRenderTargetBits

void CTextureManager::ReleaseTempRenderTargetBits( void )
{
	if( IsX360() ) //only sane on 360
	{
		int iNext;
		for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = iNext )
		{
			iNext = m_TextureList.Next( i );

			if ( m_TextureList[i]->IsTempRenderTarget() )
			{
				m_TextureList[i]->Release();
			}
		}
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:16,代码来源:texturemanager.cpp

示例15: RemoveUnusedTextures

void CTextureManager::RemoveUnusedTextures( void )
{
	int iNext;
	for ( int i = m_TextureList.First(); i != m_TextureList.InvalidIndex(); i = iNext )
	{
		iNext = m_TextureList.Next( i );

#ifdef _DEBUG
		if ( m_TextureList[i]->GetReferenceCount() < 0 )
		{
			Warning( "RemoveUnusedTextures: pTexture->m_referenceCount < 0 for %s\n", m_TextureList[i]->GetName() );
		}
#endif
		if ( m_TextureList[i]->GetReferenceCount() <= 0 )
		{
			ITextureInternal::Destroy( m_TextureList[i] );
			m_TextureList.RemoveAt( i );
		}
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:20,代码来源:texturemanager.cpp


注:本文中的CUtlDict::First方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。