/* ================ idDeclAF::RebuildTextSource ================ */ bool idDeclAF::RebuildTextSource( void ) { int i; idFile_Memory f; f.WriteFloatString("\n\n/*\n" "\tGenerated by the Articulated Figure Editor.\n" "\tDo not edit directly but launch the game and type 'editAFs' on the console.\n" "*/\n" ); f.WriteFloatString( "\narticulatedFigure %s {\n", GetName() ); if ( !WriteSettings( &f ) ) { return false; } for ( i = 0; i < bodies.Num(); i++ ) { if ( !WriteBody( &f, *bodies[i] ) ) { return false; } } for ( i = 0; i < constraints.Num(); i++ ) { if ( !WriteConstraint( &f, *constraints[i] ) ) { return false; } } f.WriteFloatString( "\n}" ); SetText( f.GetDataPtr() ); return true; }
QString OPMLWriter::Write (const channels_shorts_t& channels, const QString& title, const QString& owner, const QString& ownerEmail) const { QDomDocument doc; QDomElement root = doc.createElement ("opml"); doc.appendChild (root); WriteHead (root, doc, title, owner, ownerEmail); WriteBody (root, doc, channels); return doc.toString (); }