//*****************************************************************************
//***                        THIS FILE IS GENERATED                        ****
//***                       DO NOT MODIFY THIS FILE !!!                    ****
//*****************************************************************************
//*****************************************************************************
//* File: D3D10EnumsInfo.cpp
//* 
//* Description: 
//*     Defines classes used to categorize enums
//*
//*****************************************************************************

// Ignore Prefast warnings 26060 (Range Precondition violation) and 28930 (Unused assignment of pointer variable)
#pragma warning( disable: 26060 )
#pragma warning( disable: 28930 )

#include "pch.h"
#include "D3D10EnumsInfo.h"

//////////////////////////////////////////////////////////////////////////
// D3D10_BIND_FLAG related definitions
//////////////////////////////////////////////////////////////////////////

tstring WGFTESTAPI ToString( D3D10_BIND_FLAG D3D10BindFlag )
{
	const D3D10BindFlagInfo *pD3D10BindFlagInfo = CD3D10BindFlagInfoMap::Find( D3D10BindFlag );
	
	if( pD3D10BindFlagInfo )
		return tstring( pD3D10BindFlagInfo->szName );
	else
		return tstring( _T( "(Unknown value)" ) );
}

//------------------------------------------------------------------------

bool WGFTESTAPI FromString( D3D10_BIND_FLAG *pD3D10BindFlag, const tstring &str )
{
	const D3D10BindFlagInfo *pD3D10BindFlagInfo = CD3D10BindFlagInfoMap::Find( str );

	if( pD3D10BindFlagInfo )
	{
		*pD3D10BindFlag = pD3D10BindFlagInfo->D3D10BindFlag;
		return true;
	}

	//BUGBUG - elenakr - what to return for other enums ???
	//*pFormat = D3D_FORMAT_UNKNOWN;
	pD3D10BindFlag = NULL;
	return false;
}

//------------------------------------------------------------------------

const D3D10BindFlagInfo CD3D10BindFlagInfoMap::m_D3D10BindFlagInfoTable[] =
{
    { (D3D10_BIND_FLAG) (0), _T( "0" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER), _T( "VERTEX_BUFFER" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER), _T( "VERTEX_BUFFER|INDEX_BUFFER" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER), _T( "VERTEX_BUFFER|CONSTANT_BUFFER" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_SHADER_RESOURCE), _T( "VERTEX_BUFFER|SHADER_RESOURCE" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_STREAM_OUTPUT), _T( "VERTEX_BUFFER|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE), _T( "VERTEX_BUFFER|INDEX_BUFFER|SHADER_RESOURCE" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_STREAM_OUTPUT), _T( "VERTEX_BUFFER|INDEX_BUFFER|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|INDEX_BUFFER|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT), _T( "VERTEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|SHADER_RESOURCE|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|SHADER_RESOURCE|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT), _T( "VERTEX_BUFFER|INDEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|INDEX_BUFFER|SHADER_RESOURCE|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|SHADER_RESOURCE|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|INDEX_BUFFER|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|SHADER_RESOURCE|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|INDEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|SHADER_RESOURCE|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_VERTEX_BUFFER|D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "VERTEX_BUFFER|INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER), _T( "INDEX_BUFFER" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER), _T( "INDEX_BUFFER|CONSTANT_BUFFER" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE), _T( "INDEX_BUFFER|SHADER_RESOURCE" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_STREAM_OUTPUT), _T( "INDEX_BUFFER|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_RENDER_TARGET), _T( "INDEX_BUFFER|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE), _T( "INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT), _T( "INDEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_RENDER_TARGET), _T( "INDEX_BUFFER|CONSTANT_BUFFER|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|CONSTANT_BUFFER|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT), _T( "INDEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET), _T( "INDEX_BUFFER|SHADER_RESOURCE|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|SHADER_RESOURCE|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "INDEX_BUFFER|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT), _T( "INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET), _T( "INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "INDEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|CONSTANT_BUFFER|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "INDEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|SHADER_RESOURCE|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|CONSTANT_BUFFER|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_INDEX_BUFFER|D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "INDEX_BUFFER|CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER), _T( "CONSTANT_BUFFER" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE), _T( "CONSTANT_BUFFER|SHADER_RESOURCE" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT), _T( "CONSTANT_BUFFER|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_RENDER_TARGET), _T( "CONSTANT_BUFFER|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_DEPTH_STENCIL), _T( "CONSTANT_BUFFER|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT), _T( "CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET), _T( "CONSTANT_BUFFER|SHADER_RESOURCE|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_DEPTH_STENCIL), _T( "CONSTANT_BUFFER|SHADER_RESOURCE|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "CONSTANT_BUFFER|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "CONSTANT_BUFFER|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "CONSTANT_BUFFER|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "CONSTANT_BUFFER|SHADER_RESOURCE|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "CONSTANT_BUFFER|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_CONSTANT_BUFFER|D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "CONSTANT_BUFFER|SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_SHADER_RESOURCE), _T( "SHADER_RESOURCE" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT), _T( "SHADER_RESOURCE|STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET), _T( "SHADER_RESOURCE|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_DEPTH_STENCIL), _T( "SHADER_RESOURCE|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "SHADER_RESOURCE|STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "SHADER_RESOURCE|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_SHADER_RESOURCE|D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "SHADER_RESOURCE|STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_STREAM_OUTPUT), _T( "STREAM_OUTPUT" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET), _T( "STREAM_OUTPUT|RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_DEPTH_STENCIL), _T( "STREAM_OUTPUT|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_STREAM_OUTPUT|D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "STREAM_OUTPUT|RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_RENDER_TARGET), _T( "RENDER_TARGET" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_RENDER_TARGET|D3D10_BIND_DEPTH_STENCIL), _T( "RENDER_TARGET|DEPTH_STENCIL" ) },
    { (D3D10_BIND_FLAG) (D3D10_BIND_DEPTH_STENCIL), _T( "DEPTH_STENCIL" ) },

};

//------------------------------------------------------------------------

// Instantiate the singleton
CD3D10BindFlagInfoMap CD3D10BindFlagInfoMap::m_Map;

//------------------------------------------------------------------------

// Construct the lookup table.
CD3D10BindFlagInfoMap::CD3D10BindFlagInfoMap()
{
	size_t count = GetD3D10BindFlagInfoTableSize();

	for(size_t i = 0; i < count; i++ )
	{
		m_ByValue.insert( ByValue::value_type( m_D3D10BindFlagInfoTable[i].D3D10BindFlag, &m_D3D10BindFlagInfoTable[i] ) );
		m_ByDesc.insert( ByDesc::value_type( m_D3D10BindFlagInfoTable[i].szName, &m_D3D10BindFlagInfoTable[i] ) );
	}
}

//------------------------------------------------------------------------

const D3D10BindFlagInfo *CD3D10BindFlagInfoMap::Find( D3D10_BIND_FLAG D3D10BindFlag )
{
	ByValue::const_iterator it = m_Map.m_ByValue.find( D3D10BindFlag );
	if( it == m_Map.m_ByValue.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const D3D10BindFlagInfo *CD3D10BindFlagInfoMap::Find( const tstring &Desc )
{
	ByDesc::const_iterator it = m_Map.m_ByDesc.find( Desc );
	if( it == m_Map.m_ByDesc.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const size_t CD3D10BindFlagInfoMap::GetD3D10BindFlagInfoTableSize()
{
	return sizeof(m_D3D10BindFlagInfoTable) / sizeof(m_D3D10BindFlagInfoTable[0]);
}


//////////////////////////////////////////////////////////////////////////
// D3D10_CPU_ACCESS_FLAG related definitions
//////////////////////////////////////////////////////////////////////////

tstring WGFTESTAPI ToString( D3D10_CPU_ACCESS_FLAG D3D10CpuAccessFlag )
{
	const D3D10CpuAccessFlagInfo *pD3D10CpuAccessFlagInfo = CD3D10CpuAccessFlagInfoMap::Find( D3D10CpuAccessFlag );
	
	if( pD3D10CpuAccessFlagInfo )
		return tstring( pD3D10CpuAccessFlagInfo->szName );
	else
		return tstring( _T( "(Unknown value)" ) );
}

//------------------------------------------------------------------------

bool WGFTESTAPI FromString( D3D10_CPU_ACCESS_FLAG *pD3D10CpuAccessFlag, const tstring &str )
{
	const D3D10CpuAccessFlagInfo *pD3D10CpuAccessFlagInfo = CD3D10CpuAccessFlagInfoMap::Find( str );

	if( pD3D10CpuAccessFlagInfo )
	{
		*pD3D10CpuAccessFlag = pD3D10CpuAccessFlagInfo->D3D10CpuAccessFlag;
		return true;
	}

	//BUGBUG - elenakr - what to return for other enums ???
	//*pFormat = D3D_FORMAT_UNKNOWN;
	pD3D10CpuAccessFlag = NULL;
	return false;
}

//------------------------------------------------------------------------

const D3D10CpuAccessFlagInfo CD3D10CpuAccessFlagInfoMap::m_D3D10CpuAccessFlagInfoTable[] =
{
    { (D3D10_CPU_ACCESS_FLAG) (0), _T( "0" ) },
    { (D3D10_CPU_ACCESS_FLAG) (D3D10_CPU_ACCESS_WRITE), _T( "WRITE" ) },
    { (D3D10_CPU_ACCESS_FLAG) (D3D10_CPU_ACCESS_WRITE|D3D10_CPU_ACCESS_READ), _T( "WRITE|READ" ) },
    { (D3D10_CPU_ACCESS_FLAG) (D3D10_CPU_ACCESS_READ), _T( "READ" ) },

};

//------------------------------------------------------------------------

// Instantiate the singleton
CD3D10CpuAccessFlagInfoMap CD3D10CpuAccessFlagInfoMap::m_Map;

//------------------------------------------------------------------------

// Construct the lookup table.
CD3D10CpuAccessFlagInfoMap::CD3D10CpuAccessFlagInfoMap()
{
	size_t count = GetD3D10CpuAccessFlagInfoTableSize();

	for(size_t i = 0; i < count; i++ )
	{
		m_ByValue.insert( ByValue::value_type( m_D3D10CpuAccessFlagInfoTable[i].D3D10CpuAccessFlag, &m_D3D10CpuAccessFlagInfoTable[i] ) );
		m_ByDesc.insert( ByDesc::value_type( m_D3D10CpuAccessFlagInfoTable[i].szName, &m_D3D10CpuAccessFlagInfoTable[i] ) );
	}
}

//------------------------------------------------------------------------

const D3D10CpuAccessFlagInfo *CD3D10CpuAccessFlagInfoMap::Find( D3D10_CPU_ACCESS_FLAG D3D10CpuAccessFlag )
{
	ByValue::const_iterator it = m_Map.m_ByValue.find( D3D10CpuAccessFlag );
	if( it == m_Map.m_ByValue.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const D3D10CpuAccessFlagInfo *CD3D10CpuAccessFlagInfoMap::Find( const tstring &Desc )
{
	ByDesc::const_iterator it = m_Map.m_ByDesc.find( Desc );
	if( it == m_Map.m_ByDesc.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const size_t CD3D10CpuAccessFlagInfoMap::GetD3D10CpuAccessFlagInfoTableSize()
{
	return sizeof(m_D3D10CpuAccessFlagInfoTable) / sizeof(m_D3D10CpuAccessFlagInfoTable[0]);
}


//////////////////////////////////////////////////////////////////////////
// D3D10_RESOURCE_MISC_FLAG related definitions
//////////////////////////////////////////////////////////////////////////

tstring WGFTESTAPI ToString( D3D10_RESOURCE_MISC_FLAG D3D10ResourceMiscFlag )
{
	const D3D10ResourceMiscFlagInfo *pD3D10ResourceMiscFlagInfo = CD3D10ResourceMiscFlagInfoMap::Find( D3D10ResourceMiscFlag );
	
	if( pD3D10ResourceMiscFlagInfo )
		return tstring( pD3D10ResourceMiscFlagInfo->szName );
	else
		return tstring( _T( "(Unknown value)" ) );
}

//------------------------------------------------------------------------

bool WGFTESTAPI FromString( D3D10_RESOURCE_MISC_FLAG *pD3D10ResourceMiscFlag, const tstring &str )
{
	const D3D10ResourceMiscFlagInfo *pD3D10ResourceMiscFlagInfo = CD3D10ResourceMiscFlagInfoMap::Find( str );

	if( pD3D10ResourceMiscFlagInfo )
	{
		*pD3D10ResourceMiscFlag = pD3D10ResourceMiscFlagInfo->D3D10ResourceMiscFlag;
		return true;
	}

	//BUGBUG - elenakr - what to return for other enums ???
	//*pFormat = D3D_FORMAT_UNKNOWN;
	pD3D10ResourceMiscFlag = NULL;
	return false;
}

//------------------------------------------------------------------------

const D3D10ResourceMiscFlagInfo CD3D10ResourceMiscFlagInfoMap::m_D3D10ResourceMiscFlagInfoTable[] =
{
    { (D3D10_RESOURCE_MISC_FLAG) (0), _T( "0" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS), _T( "GENERATE_MIPS" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED), _T( "GENERATE_MIPS|SHARED" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_TEXTURECUBE), _T( "GENERATE_MIPS|TEXTURECUBE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX), _T( "GENERATE_MIPS|SHARED_KEYEDMUTEX" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GENERATE_MIPS|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_TEXTURECUBE), _T( "GENERATE_MIPS|SHARED|TEXTURECUBE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX), _T( "GENERATE_MIPS|SHARED|SHARED_KEYEDMUTEX" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GENERATE_MIPS|SHARED|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX), _T( "GENERATE_MIPS|TEXTURECUBE|SHARED_KEYEDMUTEX" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GENERATE_MIPS|TEXTURECUBE|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GENERATE_MIPS|SHARED_KEYEDMUTEX|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX), _T( "GENERATE_MIPS|SHARED|TEXTURECUBE|SHARED_KEYEDMUTEX" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GENERATE_MIPS|SHARED|TEXTURECUBE|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GENERATE_MIPS|SHARED|SHARED_KEYEDMUTEX|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GENERATE_MIPS|TEXTURECUBE|SHARED_KEYEDMUTEX|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GENERATE_MIPS|D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GENERATE_MIPS|SHARED|TEXTURECUBE|SHARED_KEYEDMUTEX|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED), _T( "SHARED" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_TEXTURECUBE), _T( "SHARED|TEXTURECUBE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX), _T( "SHARED|SHARED_KEYEDMUTEX" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "SHARED|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX), _T( "SHARED|TEXTURECUBE|SHARED_KEYEDMUTEX" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "SHARED|TEXTURECUBE|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "SHARED|SHARED_KEYEDMUTEX|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED|D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "SHARED|TEXTURECUBE|SHARED_KEYEDMUTEX|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_TEXTURECUBE), _T( "TEXTURECUBE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX), _T( "TEXTURECUBE|SHARED_KEYEDMUTEX" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "TEXTURECUBE|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_TEXTURECUBE|D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "TEXTURECUBE|SHARED_KEYEDMUTEX|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX), _T( "SHARED_KEYEDMUTEX" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX|D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "SHARED_KEYEDMUTEX|GDI_COMPATIBLE" ) },
    { (D3D10_RESOURCE_MISC_FLAG) (D3D10_RESOURCE_MISC_GDI_COMPATIBLE), _T( "GDI_COMPATIBLE" ) },

};

//------------------------------------------------------------------------

// Instantiate the singleton
CD3D10ResourceMiscFlagInfoMap CD3D10ResourceMiscFlagInfoMap::m_Map;

//------------------------------------------------------------------------

// Construct the lookup table.
CD3D10ResourceMiscFlagInfoMap::CD3D10ResourceMiscFlagInfoMap()
{
	size_t count = GetD3D10ResourceMiscFlagInfoTableSize();

	for(size_t i = 0; i < count; i++ )
	{
		m_ByValue.insert( ByValue::value_type( m_D3D10ResourceMiscFlagInfoTable[i].D3D10ResourceMiscFlag, &m_D3D10ResourceMiscFlagInfoTable[i] ) );
		m_ByDesc.insert( ByDesc::value_type( m_D3D10ResourceMiscFlagInfoTable[i].szName, &m_D3D10ResourceMiscFlagInfoTable[i] ) );
	}
}

//------------------------------------------------------------------------

const D3D10ResourceMiscFlagInfo *CD3D10ResourceMiscFlagInfoMap::Find( D3D10_RESOURCE_MISC_FLAG D3D10ResourceMiscFlag )
{
	ByValue::const_iterator it = m_Map.m_ByValue.find( D3D10ResourceMiscFlag );
	if( it == m_Map.m_ByValue.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const D3D10ResourceMiscFlagInfo *CD3D10ResourceMiscFlagInfoMap::Find( const tstring &Desc )
{
	ByDesc::const_iterator it = m_Map.m_ByDesc.find( Desc );
	if( it == m_Map.m_ByDesc.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const size_t CD3D10ResourceMiscFlagInfoMap::GetD3D10ResourceMiscFlagInfoTableSize()
{
	return sizeof(m_D3D10ResourceMiscFlagInfoTable) / sizeof(m_D3D10ResourceMiscFlagInfoTable[0]);
}


//////////////////////////////////////////////////////////////////////////
// D3D10_MAP_FLAG related definitions
//////////////////////////////////////////////////////////////////////////

tstring WGFTESTAPI ToString( D3D10_MAP_FLAG D3D10MapFlag )
{
	const D3D10MapFlagInfo *pD3D10MapFlagInfo = CD3D10MapFlagInfoMap::Find( D3D10MapFlag );
	
	if( pD3D10MapFlagInfo )
		return tstring( pD3D10MapFlagInfo->szName );
	else
		return tstring( _T( "(Unknown value)" ) );
}

//------------------------------------------------------------------------

bool WGFTESTAPI FromString( D3D10_MAP_FLAG *pD3D10MapFlag, const tstring &str )
{
	const D3D10MapFlagInfo *pD3D10MapFlagInfo = CD3D10MapFlagInfoMap::Find( str );

	if( pD3D10MapFlagInfo )
	{
		*pD3D10MapFlag = pD3D10MapFlagInfo->D3D10MapFlag;
		return true;
	}

	//BUGBUG - elenakr - what to return for other enums ???
	//*pFormat = D3D_FORMAT_UNKNOWN;
	pD3D10MapFlag = NULL;
	return false;
}

//------------------------------------------------------------------------

const D3D10MapFlagInfo CD3D10MapFlagInfoMap::m_D3D10MapFlagInfoTable[] =
{
    { (D3D10_MAP_FLAG) (0), _T( "0" ) },
    { (D3D10_MAP_FLAG) (D3D10_MAP_FLAG_DO_NOT_WAIT), _T( "MAP_FLAG_DO_NOT_WAIT" ) },

};

//------------------------------------------------------------------------

// Instantiate the singleton
CD3D10MapFlagInfoMap CD3D10MapFlagInfoMap::m_Map;

//------------------------------------------------------------------------

// Construct the lookup table.
CD3D10MapFlagInfoMap::CD3D10MapFlagInfoMap()
{
	size_t count = GetD3D10MapFlagInfoTableSize();

	for(size_t i = 0; i < count; i++ )
	{
		m_ByValue.insert( ByValue::value_type( m_D3D10MapFlagInfoTable[i].D3D10MapFlag, &m_D3D10MapFlagInfoTable[i] ) );
		m_ByDesc.insert( ByDesc::value_type( m_D3D10MapFlagInfoTable[i].szName, &m_D3D10MapFlagInfoTable[i] ) );
	}
}

//------------------------------------------------------------------------

const D3D10MapFlagInfo *CD3D10MapFlagInfoMap::Find( D3D10_MAP_FLAG D3D10MapFlag )
{
	ByValue::const_iterator it = m_Map.m_ByValue.find( D3D10MapFlag );
	if( it == m_Map.m_ByValue.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const D3D10MapFlagInfo *CD3D10MapFlagInfoMap::Find( const tstring &Desc )
{
	ByDesc::const_iterator it = m_Map.m_ByDesc.find( Desc );
	if( it == m_Map.m_ByDesc.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const size_t CD3D10MapFlagInfoMap::GetD3D10MapFlagInfoTableSize()
{
	return sizeof(m_D3D10MapFlagInfoTable) / sizeof(m_D3D10MapFlagInfoTable[0]);
}


//////////////////////////////////////////////////////////////////////////
// D3D10_RAISE_FLAG related definitions
//////////////////////////////////////////////////////////////////////////

tstring WGFTESTAPI ToString( D3D10_RAISE_FLAG D3D10RaiseFlag )
{
	const D3D10RaiseFlagInfo *pD3D10RaiseFlagInfo = CD3D10RaiseFlagInfoMap::Find( D3D10RaiseFlag );
	
	if( pD3D10RaiseFlagInfo )
		return tstring( pD3D10RaiseFlagInfo->szName );
	else
		return tstring( _T( "(Unknown value)" ) );
}

//------------------------------------------------------------------------

bool WGFTESTAPI FromString( D3D10_RAISE_FLAG *pD3D10RaiseFlag, const tstring &str )
{
	const D3D10RaiseFlagInfo *pD3D10RaiseFlagInfo = CD3D10RaiseFlagInfoMap::Find( str );

	if( pD3D10RaiseFlagInfo )
	{
		*pD3D10RaiseFlag = pD3D10RaiseFlagInfo->D3D10RaiseFlag;
		return true;
	}

	//BUGBUG - elenakr - what to return for other enums ???
	//*pFormat = D3D_FORMAT_UNKNOWN;
	pD3D10RaiseFlag = NULL;
	return false;
}

//------------------------------------------------------------------------

const D3D10RaiseFlagInfo CD3D10RaiseFlagInfoMap::m_D3D10RaiseFlagInfoTable[] =
{
    { (D3D10_RAISE_FLAG) (0), _T( "0" ) },
    { (D3D10_RAISE_FLAG) (D3D10_RAISE_FLAG_DRIVER_INTERNAL_ERROR), _T( "RAISE_FLAG_DRIVER_INTERNAL_ERROR" ) },

};

//------------------------------------------------------------------------

// Instantiate the singleton
CD3D10RaiseFlagInfoMap CD3D10RaiseFlagInfoMap::m_Map;

//------------------------------------------------------------------------

// Construct the lookup table.
CD3D10RaiseFlagInfoMap::CD3D10RaiseFlagInfoMap()
{
	size_t count = GetD3D10RaiseFlagInfoTableSize();

	for(size_t i = 0; i < count; i++ )
	{
		m_ByValue.insert( ByValue::value_type( m_D3D10RaiseFlagInfoTable[i].D3D10RaiseFlag, &m_D3D10RaiseFlagInfoTable[i] ) );
		m_ByDesc.insert( ByDesc::value_type( m_D3D10RaiseFlagInfoTable[i].szName, &m_D3D10RaiseFlagInfoTable[i] ) );
	}
}

//------------------------------------------------------------------------

const D3D10RaiseFlagInfo *CD3D10RaiseFlagInfoMap::Find( D3D10_RAISE_FLAG D3D10RaiseFlag )
{
	ByValue::const_iterator it = m_Map.m_ByValue.find( D3D10RaiseFlag );
	if( it == m_Map.m_ByValue.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const D3D10RaiseFlagInfo *CD3D10RaiseFlagInfoMap::Find( const tstring &Desc )
{
	ByDesc::const_iterator it = m_Map.m_ByDesc.find( Desc );
	if( it == m_Map.m_ByDesc.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const size_t CD3D10RaiseFlagInfoMap::GetD3D10RaiseFlagInfoTableSize()
{
	return sizeof(m_D3D10RaiseFlagInfoTable) / sizeof(m_D3D10RaiseFlagInfoTable[0]);
}


//////////////////////////////////////////////////////////////////////////
// D3D10_CLEAR_FLAG related definitions
//////////////////////////////////////////////////////////////////////////

tstring WGFTESTAPI ToString( D3D10_CLEAR_FLAG D3D10ClearFlag )
{
	const D3D10ClearFlagInfo *pD3D10ClearFlagInfo = CD3D10ClearFlagInfoMap::Find( D3D10ClearFlag );
	
	if( pD3D10ClearFlagInfo )
		return tstring( pD3D10ClearFlagInfo->szName );
	else
		return tstring( _T( "(Unknown value)" ) );
}

//------------------------------------------------------------------------

bool WGFTESTAPI FromString( D3D10_CLEAR_FLAG *pD3D10ClearFlag, const tstring &str )
{
	const D3D10ClearFlagInfo *pD3D10ClearFlagInfo = CD3D10ClearFlagInfoMap::Find( str );

	if( pD3D10ClearFlagInfo )
	{
		*pD3D10ClearFlag = pD3D10ClearFlagInfo->D3D10ClearFlag;
		return true;
	}

	//BUGBUG - elenakr - what to return for other enums ???
	//*pFormat = D3D_FORMAT_UNKNOWN;
	pD3D10ClearFlag = NULL;
	return false;
}

//------------------------------------------------------------------------

const D3D10ClearFlagInfo CD3D10ClearFlagInfoMap::m_D3D10ClearFlagInfoTable[] =
{
    { (D3D10_CLEAR_FLAG) (0), _T( "0" ) },
    { (D3D10_CLEAR_FLAG) (D3D10_CLEAR_DEPTH), _T( "DEPTH" ) },
    { (D3D10_CLEAR_FLAG) (D3D10_CLEAR_DEPTH|D3D10_CLEAR_STENCIL), _T( "DEPTH|STENCIL" ) },
    { (D3D10_CLEAR_FLAG) (D3D10_CLEAR_STENCIL), _T( "STENCIL" ) },

};

//------------------------------------------------------------------------

// Instantiate the singleton
CD3D10ClearFlagInfoMap CD3D10ClearFlagInfoMap::m_Map;

//------------------------------------------------------------------------

// Construct the lookup table.
CD3D10ClearFlagInfoMap::CD3D10ClearFlagInfoMap()
{
	size_t count = GetD3D10ClearFlagInfoTableSize();

	for(size_t i = 0; i < count; i++ )
	{
		m_ByValue.insert( ByValue::value_type( m_D3D10ClearFlagInfoTable[i].D3D10ClearFlag, &m_D3D10ClearFlagInfoTable[i] ) );
		m_ByDesc.insert( ByDesc::value_type( m_D3D10ClearFlagInfoTable[i].szName, &m_D3D10ClearFlagInfoTable[i] ) );
	}
}

//------------------------------------------------------------------------

const D3D10ClearFlagInfo *CD3D10ClearFlagInfoMap::Find( D3D10_CLEAR_FLAG D3D10ClearFlag )
{
	ByValue::const_iterator it = m_Map.m_ByValue.find( D3D10ClearFlag );
	if( it == m_Map.m_ByValue.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const D3D10ClearFlagInfo *CD3D10ClearFlagInfoMap::Find( const tstring &Desc )
{
	ByDesc::const_iterator it = m_Map.m_ByDesc.find( Desc );
	if( it == m_Map.m_ByDesc.end() )
		return NULL;
	else
		return (*it).second;
}

//------------------------------------------------------------------------

const size_t CD3D10ClearFlagInfoMap::GetD3D10ClearFlagInfoTableSize()
{
	return sizeof(m_D3D10ClearFlagInfoTable) / sizeof(m_D3D10ClearFlagInfoTable[0]);
}


