diff data/model/SparseModel.h @ 838:33fca917c800

Add toDelimitedDataString alternative with frame extents
author Chris Cannam
date Wed, 09 Oct 2013 14:47:19 +0100
parents 05ba4bbd2b87
children c2a399f93843
line wrap: on
line diff
--- a/data/model/SparseModel.h	Wed Oct 09 14:45:21 2013 +0100
+++ b/data/model/SparseModel.h	Wed Oct 09 14:47:19 2013 +0100
@@ -157,6 +157,17 @@
         return s;
     }
 
+    virtual QString toDelimitedDataString(QString delimiter, size_t f0, size_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";
+            }
+        }
+        return s;
+    }
+
     /**
      * Command to add a point, with undo.
      */