- auto filter = dynamic_cast< TFilter* >( vIt->second.GetPointer( ) );
- auto data = dynamic_cast< TData* >( vIt->second.GetPointer( ) );
- if( filter != NULL )
- {
- TiXmlElement* e = new TiXmlElement( "filter" );
- e->SetAttribute( "class", filter->GetClassName( ) );
- e->SetAttribute( "name", filter->GetName( ) );
- e->SetAttribute( "ViewX", filter->GetViewX( ) );
- e->SetAttribute( "ViewY", filter->GetViewY( ) );
-
- const TParameters* params = filter->GetParameters( );
- 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 );
+ auto filter = i->second;
+ used_plugins.insert( filter->GetPluginName( ) );
+ tinyxml2::XMLElement* e = doc->NewElement( "Filter" );
+ e->SetAttribute( "Category", filter->GetClassCategory( ) );
+ e->SetAttribute( "Class", filter->GetClassName( ) );
+ e->SetAttribute( "Name", filter->GetName( ) );
+ e->SetAttribute( "ViewX", filter->GetViewX( ) );
+ e->SetAttribute( "ViewY", filter->GetViewY( ) );
+ e->SetAttribute(
+ "ExplicitExecution", ( filter->GetExplicitExecution( ) )? 1: 0
+ );