changeset 459:6441b31b37ac

* somewhat clearer layout in region layer
author Chris Cannam
date Thu, 16 Oct 2008 13:38:33 +0000
parents f60360209e5c
children 93fb1ebff76b
files data/model/IntervalModel.h data/model/RegionModel.h data/model/SparseModel.h
diffstat 3 files changed, 18 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/IntervalModel.h	Wed Oct 15 12:08:02 2008 +0000
+++ b/data/model/IntervalModel.h	Thu Oct 16 13:38:33 2008 +0000
@@ -57,6 +57,10 @@
      */
     virtual typename SparseValueModel<PointType>::PointList getPoints(long frame) const;
 
+    virtual const typename SparseModel<PointType>::PointList &getPoints() const {
+        return SparseModel<PointType>::getPoints(); 
+    }
+
     /**
      * TabularModel methods.  
      */
--- a/data/model/RegionModel.h	Wed Oct 15 12:08:02 2008 +0000
+++ b/data/model/RegionModel.h	Thu Oct 16 13:38:33 2008 +0000
@@ -101,8 +101,8 @@
     }
 
     RegionModel(size_t sampleRate, size_t resolution,
-	      float valueMinimum, float valueMaximum,
-	      bool notifyOnAdd = true) :
+                float valueMinimum, float valueMaximum,
+                bool notifyOnAdd = true) :
 	IntervalModel<RegionRec>(sampleRate, resolution,
                             valueMinimum, valueMaximum,
                             notifyOnAdd),
--- a/data/model/SparseModel.h	Wed Oct 15 12:08:02 2008 +0000
+++ b/data/model/SparseModel.h	Thu Oct 16 13:38:33 2008 +0000
@@ -79,6 +79,11 @@
     virtual size_t getPointCount() const;
 
     /**
+     * Get all points.
+     */
+    virtual const PointList &getPoints() const;
+
+    /**
      * Get all of the points in this model between the given
      * boundaries (in frames), as well as up to two points before and
      * after the boundaries.  If you need exact boundaries, check the
@@ -93,11 +98,6 @@
     virtual PointList getPoints(long frame) const;
 
     /**
-     * Get all points.
-     */
-    virtual const PointList &getPoints() const { return m_points; }
-
-    /**
      * Return all points that share the nearest frame number prior to
      * the given one at which there are any points.
      */
@@ -477,6 +477,13 @@
 }
 
 template <typename PointType>
+const typename SparseModel<PointType>::PointList &
+SparseModel<PointType>::getPoints() const
+{
+    return m_points;
+}
+
+template <typename PointType>
 typename SparseModel<PointType>::PointList
 SparseModel<PointType>::getPoints(long start, long end) const
 {