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


C++ TIXML_SSCANF函数代码示例

本文整理汇总了C++中TIXML_SSCANF函数的典型用法代码示例。如果您正苦于以下问题:C++ TIXML_SSCANF函数的具体用法?C++ TIXML_SSCANF怎么用?C++ TIXML_SSCANF使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: ToDouble

	bool XMLUtil::ToDouble(const char* str, double* value)
	{
		if (TIXML_SSCANF(str, "%lf", value) == 1)
		{
			return true;
		}
		return false;
	}
开发者ID:CooperCoders,项目名称:GraphicsProject,代码行数:8,代码来源:tinyxml2.cpp

示例2: ToFloat

	bool XMLUtil::ToFloat(const char* str, float* value)
	{
		if (TIXML_SSCANF(str, "%f", value) == 1)
		{
			return true;
		}
		return false;
	}
开发者ID:CooperCoders,项目名称:GraphicsProject,代码行数:8,代码来源:tinyxml2.cpp

示例3: ToUnsigned

	bool XMLUtil::ToUnsigned(const char* str, unsigned *value)
	{
		if (TIXML_SSCANF(str, "%u", value) == 1)
		{
			return true;
		}
		return false;
	}
开发者ID:CooperCoders,项目名称:GraphicsProject,代码行数:8,代码来源:tinyxml2.cpp

示例4: ToInt

	bool XMLUtil::ToInt(const char* str, int* value)
	{
		if (TIXML_SSCANF(str, "%d", value) == 1)
		{
			return true;
		}
		return false;
	}
开发者ID:CooperCoders,项目名称:GraphicsProject,代码行数:8,代码来源:tinyxml2.cpp

示例5: Attribute

const std::wstring* TiXmlElement::Attribute( const std::wstring& name, double* d ) const
{
	const std::wstring* s = Attribute( name );
	if ( d )
	{
		if ( s ) {
			//*d = _wtof( s->c_str() );
			TIXML_SSCANF( s->c_str(), L"%f", d );
		}
		else {
			*d = 0;
		}
	}
	return s;
}
开发者ID:andrew-git,项目名称:nme,代码行数:15,代码来源:tinyxml.cpp

示例6: setlocale

int TiXmlAttribute::QueryDoubleValue( double* dval ) const
{
#ifndef WIN32
    // need to switch to default locale "C" to prevent problems when current locale uses comma
    // instead of decimal point
    const char* oldlocale = setlocale(LC_NUMERIC, "C");
#endif

    if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 ) {
#ifndef WIN32
        setlocale(LC_NUMERIC, oldlocale);
#endif
		return TIXML_SUCCESS;
    }
#ifndef WIN32
    setlocale(LC_NUMERIC, oldlocale);
#endif
	return TIXML_WRONG_TYPE;
}
开发者ID:gobirdwang,项目名称:hmeshsimp,代码行数:19,代码来源:tinyxml.cpp

示例7: QueryDoubleValue

int TiXmlAttribute::QueryDoubleValue( double* dval ) const
{
	if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 )
		return TIXML_SUCCESS;
	return TIXML_WRONG_TYPE;
}
开发者ID:dos5gw,项目名称:TMeter,代码行数:6,代码来源:tinyxml.cpp

示例8: QueryIntValue

int TiXmlAttribute::QueryIntValue( int* ival ) const
{
	if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 )
		return TIXML_SUCCESS;
	return TIXML_WRONG_TYPE;
}
开发者ID:dos5gw,项目名称:TMeter,代码行数:6,代码来源:tinyxml.cpp

示例9: QueryUnLongValue

int TiXmlAttribute::QueryUnLongValue( unsigned long int* ival ) const
{
	if ( TIXML_SSCANF( value.c_str(), "%lu", ival ) == 1 )
		return TIXML_SUCCESS;
	return TIXML_WRONG_TYPE;
}
开发者ID:stahta01,项目名称:EmBlocks_old,代码行数:6,代码来源:tinyxml.cpp

示例10: ProcessCommand


//.........这里部分代码省略.........
		
	case 0x689fc51d /* "soundvolumemusic" */:
		return ProcessCommandFloat(SOUND_VOLUME_MUSIC, aParam, aCount, UpdateSoundVolume, "soundvolume: %f\n");
		
	case 0x94c716fd /* "outputconsole" */:
		return ProcessCommandBool(DEBUGPRINT_OUTPUTCONSOLE, aParam, aCount, NULL, "outputconsole: %d\n");

	case 0x54822903 /* "outputdebug" */:
		return ProcessCommandBool(DEBUGPRINT_OUTPUTDEBUG, aParam, aCount, NULL, "outputdebug: %d\n");

	case 0x8940763c /* "outputstderr" */:
		return ProcessCommandBool(DEBUGPRINT_OUTPUTSTDERR, aParam, aCount, NULL, "outputstderr: %d\n");

	case 0xfbcc8f02 /* "profilescreen" */:
		return ProcessCommandBool(PROFILER_OUTPUTSCREEN, aParam, aCount, NULL, "profilescreen: %d\n");

	case 0x85e872f9 /* "profileprint" */:
		return ProcessCommandBool(PROFILER_OUTPUTPRINT, aParam, aCount, NULL, "profileprint: %d\n");

	case 0x24ce5450 /* "frameratescreen" */:
		return ProcessCommandBool(FRAMERATE_OUTPUTSCREEN, aParam, aCount, NULL, "frameratescreen: %d\n");

	case 0x55cfbc33 /* "framerateprint" */:
		return ProcessCommandBool(FRAMERATE_OUTPUTPRINT, aParam, aCount, NULL, "framerateprint: %d\n");

	case 0xe41f87fa /* "debugdraw" */:
		return ProcessCommandBool(DEBUG_DRAW, aParam, aCount, NULL, "debugdraw: %d\n");

	case 0xa165ddb8 /* "database" */:
		if (aCount >= 1)
		{
			// get the database identifier
			unsigned int id;
			if (!TIXML_SSCANF(aParam[0], "0x%x", &id))
				id = Hash(aParam[0]);

			// get the dtabase
			Database::Untyped *db = Database::GetDatabases().Get(id);
			if (db)
			{
				// list database properties
				OGLCONSOLE_Output(console, "stride=%d shift=%d bits=%d limit=%d count=%d\n",
					db->GetStride(), db->GetShift(), db->GetBits(), db->GetLimit(), db->GetCount());
			}
			else
			{
				// not found
				OGLCONSOLE_Output(console, "database \"%s\" (0x%08x) not found\n", aParam[0], id);
			}
			return 1;
		}
		else
		{
			// list all database identifiers
			OGLCONSOLE_Output(console, "databases:\n");
			for (Database::Untyped::Iterator itor(&Database::GetDatabases()); itor.IsValid(); ++itor)
			{
				OGLCONSOLE_Output(console, "0x%08x\n", itor.GetKey());
			}
			return 0;
		}

	case 0xbdf0855a /* "find" */:
		if (aCount >= 1)
		{
			// get the database identifier
开发者ID:Fissuras,项目名称:videoventure,代码行数:67,代码来源:Command.cpp

示例11: QueryUnsignedIntValue

int TiXmlAttribute::QueryUnsignedIntValue( unsigned int* dval ) const
{
	if ( TIXML_SSCANF( value.c_str(), "%08x", dval ) == 1 )
		return TIXML_SUCCESS;
	return TIXML_WRONG_TYPE;
}
开发者ID:LibXenonProject,项目名称:xmplayer,代码行数:6,代码来源:tinyxml.cpp


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