diff data/model/SparseModel.h @ 314:70a232b1f12a

* Make XmlExportable::toXml the function that is universally overridden (and pure virtual) instead of toXmlString. Tidies up some classes, notably the model classes, significantly. Closes #1794561.
author Chris Cannam
date Thu, 18 Oct 2007 10:15:07 +0000
parents 73537d900d4b
children 7a4bd2c8585c
line wrap: on
line diff
--- a/data/model/SparseModel.h	Wed Oct 17 12:58:45 2007 +0000
+++ b/data/model/SparseModel.h	Thu Oct 18 10:15:07 2007 +0000
@@ -136,9 +136,6 @@
                        QString indent = "",
                        QString extraAttributes = "") const;
 
-    virtual QString toXmlString(QString indent = "",
-				QString extraAttributes = "") const;
-
     virtual QString toDelimitedDataString(QString delimiter) const
     { 
         QString s;
@@ -567,7 +564,7 @@
 	.arg(PointType(0).getDimensions());
 
     for (PointListIterator i = m_points.begin(); i != m_points.end(); ++i) {
-	out << i->toXmlString(indent + "  ");
+        i->toXml(out, indent + "  ");
     }
 
     out << indent;
@@ -575,21 +572,6 @@
 }
 
 template <typename PointType>
-QString
-SparseModel<PointType>::toXmlString(QString indent,
-				    QString extraAttributes) const
-{
-    QString s;
-
-    {
-        QTextStream out(&s);
-        toXml(out, indent, extraAttributes);
-    }
-
-    return s;
-}
-    
-template <typename PointType>
 SparseModel<PointType>::EditCommand::EditCommand(SparseModel *model,
                                                  QString commandName) :
     MacroCommand(commandName),