diff data/model/SparseModel.h @ 1060:57633d605547 tonioni

Add data export options (not all implemented yet)
author Chris Cannam
date Mon, 30 Mar 2015 17:27:25 +0100
parents a1cd5abcb38b
children c9fdd9921146
line wrap: on
line diff
--- a/data/model/SparseModel.h	Mon Mar 30 16:58:01 2015 +0100
+++ b/data/model/SparseModel.h	Mon Mar 30 17:27:25 2015 +0100
@@ -148,21 +148,28 @@
                        QString indent = "",
                        QString extraAttributes = "") const;
 
-    virtual QString toDelimitedDataString(QString delimiter) const
-    { 
+    virtual QString toDelimitedDataString(QString delimiter) const {
+        return toDelimitedDataStringWithOptions(delimiter, DataExportDefaults);
+    }
+
+    virtual QString toDelimitedDataStringWithOptions(QString delimiter,
+                                                     DataExportOptions opts) const { 
         QString s;
         for (PointListConstIterator i = m_points.begin(); i != m_points.end(); ++i) {
-            s += i->toDelimitedDataString(delimiter, m_sampleRate) + "\n";
+            s += i->toDelimitedDataString(delimiter, opts, m_sampleRate) + "\n";
         }
         return s;
     }
 
-    virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const
-    { 
+    virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const {
+        return toDelimitedDataStringSubsetWithOptions(delimiter, DataExportDefaults, f0, f1);
+    }
+
+    virtual QString toDelimitedDataStringSubsetWithOptions(QString delimiter, DataExportOptions opts, sv_frame_t f0, sv_frame_t f1) const { 
         QString s;
         for (PointListConstIterator i = m_points.begin(); i != m_points.end(); ++i) {
             if (i->frame >= f0 && i->frame < f1) {
-                s += i->toDelimitedDataString(delimiter, m_sampleRate) + "\n";
+                s += i->toDelimitedDataString(delimiter, opts, m_sampleRate) + "\n";
             }
         }
         return s;