- std::vector< std::string > names;
- params->GetNames( names );
- for( auto nIt = names.begin( ); nIt != names.end( ); ++nIt )
- {
- TiXmlElement* p = new TiXmlElement( "parameter" );
- p->SetAttribute( "name", nIt->c_str( ) );
- if( params->HasString( *nIt ) )
- p->SetAttribute( "type", "String" );
- else if( params->HasBool( *nIt ) )
- p->SetAttribute( "type", "Bool" );
- else if( params->HasInt( *nIt ) )
- p->SetAttribute( "type", "Int" );
- else if( params->HasUint( *nIt ) )
- p->SetAttribute( "type", "Uint" );
- else if( params->HasReal( *nIt ) )
- p->SetAttribute( "type", "Real" );
- else if( params->HasIndex( *nIt ) )
- p->SetAttribute( "type", "Index" );
- else if( params->HasPoint( *nIt ) )
- p->SetAttribute( "type", "Point" );
- else if( params->HasVector( *nIt ) )
- p->SetAttribute( "type", "Vector" );
- else if( params->HasStringList( *nIt ) )
- p->SetAttribute( "type", "StringList" );
- else if( params->HasBoolList( *nIt ) )
- p->SetAttribute( "type", "BoolList" );
- else if( params->HasIntList( *nIt ) )
- p->SetAttribute( "type", "IntList" );
- else if( params->HasUintList( *nIt ) )
- p->SetAttribute( "type", "UintList" );
- else if( params->HasRealList( *nIt ) )
- p->SetAttribute( "type", "RealList" );
- else if( params->HasIndexList( *nIt ) )
- p->SetAttribute( "type", "IndexList" );
- else if( params->HasPointList( *nIt ) )
- p->SetAttribute( "type", "PointList" );
- else if( params->HasVectorList( *nIt ) )
- p->SetAttribute( "type", "VectorList" );
- else if( params->HasChoices( *nIt ) )
- p->SetAttribute( "type", "Choices" );
- p->SetAttribute(
- "value", params->GetString( *nIt, false ).c_str( )
- );
- e->LinkEndChild( p );