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


C++ Name::Get方法代码示例

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


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

示例1: str

bool Helium::AssetResolver::Resolve( const Name& identity, Reflect::ObjectPtr& pointer, const Reflect::MetaClass* pointerClass )
{
	// Paths begin with /
	if (!identity.IsEmpty() && (*identity)[0] == '/')
	{
		HELIUM_TRACE( TraceLevels::Info, TXT( "Resolving object [%s]\n" ), identity.Get() );

		AssetPath p;
		p.Set(*identity);

		size_t loadRequestId = AssetLoader::GetStaticInstance()->BeginLoadObject(p);
		m_Fixups.Push( Fixup( pointer, pointerClass, loadRequestId ) );

		return true;
	}
	else
	{
#if HELIUM_TOOLS
		// Some extra checking to make friendly error messages
		String str ( identity.Get() );
		uint32_t index = Invalid< uint32_t >();
		int parseSuccessful = str.Parse( "%d", &index );

		if (!parseSuccessful)
		{
			HELIUM_TRACE(
				TraceLevels::Warning,
				"AssetResolver::Resolve - Identity '%s' is not a number, but doesn't start with '/'. If this is a path, it must begin with '/'!\n", 
				*str);
		}
#endif

		HELIUM_TRACE( TraceLevels::Debug, TXT( "Deferring resolution of [%s] to archive\n" ), identity.Get() );
	}

	return false;
}
开发者ID:justinliew,项目名称:Helium,代码行数:37,代码来源:AssetLoader.cpp

示例2: if

bool Helium::AssetIdentifier::Identify( Reflect::Object* object, Name& identity )
{
	Asset *pAsset = Reflect::SafeCast<Asset>(object);

	if ( pAsset )
	{
		identity.Set(pAsset->GetPath().ToString());
		HELIUM_TRACE( TraceLevels::Info, TXT( "Identifying object [%s]\n" ), identity.Get() );
		return true;
	}
	else if ( object )
	{
		HELIUM_TRACE( TraceLevels::Info, TXT( "Deferring identification of object of type [%s]\n" ), object->GetMetaClass()->m_Name );
	}

	return false;
}
开发者ID:kevindqc,项目名称:Helium,代码行数:17,代码来源:AssetLoader.cpp

示例3: TXT

bool Helium::AssetResolver::Resolve( const Name& identity, Reflect::ObjectPtr& pointer, const Reflect::MetaClass* pointerClass )
{
	// Paths begin with /
	if (!identity.IsEmpty() && (*identity)[0] == '/')
	{
		HELIUM_TRACE( TraceLevels::Info, TXT( "Resolving object [%s]\n" ), identity.Get() );

		AssetPath p;
		p.Set(*identity);

		size_t loadRequestId = AssetLoader::GetStaticInstance()->BeginLoadObject(p);
		m_Fixups.Push( Fixup( pointer, pointerClass, loadRequestId ) );

		return true;
	}
	else
	{
		HELIUM_TRACE( TraceLevels::Info, TXT( "Deferring resolution of [%s] to archive\n" ), identity.Get() );
	}

	return false;
}
开发者ID:kevindqc,项目名称:Helium,代码行数:22,代码来源:AssetLoader.cpp


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