Пример #1
0
void RadarValues::LoadFromNode( const XNode* pNode ) 
{
	ASSERT( pNode->m_sName == "RadarValues" );

	Zero();

	FOREACH_RadarCategory( rc )
		pNode->GetChildValue( RadarCategoryToString(rc),	m_Values.f[rc] );
}
Пример #2
0
XNode* RadarValues::CreateNode( bool bIncludeSimpleValues, bool bIncludeComplexValues ) const
{
	XNode* pNode = new XNode( "RadarValues" );

	// TRICKY: Don't print a remainder for the integer values.
	FOREACH_ENUM( RadarCategory, rc )
	{
		if( rc >= RadarCategory_TapsAndHolds )
		{
			if( bIncludeSimpleValues )
				pNode->AppendChild( RadarCategoryToString(rc),	(int)m_Values.f[rc] );
		}
		else
		{
			if( bIncludeComplexValues )
				pNode->AppendChild( RadarCategoryToString(rc),	m_Values.f[rc] );
		}
	}

	return pNode;
}
Пример #3
0
XNode* RadarValues::CreateNode() const
{
	XNode* pNode = new XNode;
	pNode->m_sName = "RadarValues";

	// TRICKY: Don't print a remainder for the integer values.
	FOREACH_RadarCategory( rc )
	{
		if( rc >= RADAR_NUM_TAPS_AND_HOLDS )
		{
			if( WRITE_SIMPLE_VALUES )
				pNode->AppendChild( RadarCategoryToString(rc),	(int)m_Values.f[rc] );
		}
		else
		{
			if( WRITE_COMPLEX_VALUES )
				pNode->AppendChild( RadarCategoryToString(rc),	m_Values.f[rc] );
		}
	}

	return pNode;
}
Пример #4
0
	FOREACH_ENUM( RadarCategory, rc )
	{
		root[ RadarCategoryToString(rc) ] = o[rc];
	}