void RadarValues::LoadFromNode( const XNode* pNode ) { ASSERT( pNode->m_sName == "RadarValues" ); Zero(); FOREACH_RadarCategory( rc ) pNode->GetChildValue( RadarCategoryToString(rc), m_Values.f[rc] ); }
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; }
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; }
FOREACH_ENUM( RadarCategory, rc ) { root[ RadarCategoryToString(rc) ] = o[rc]; }