# HG changeset patch # User Chris Cannam # Date 1224164313 0 # Node ID 6441b31b37acdb48fa0e4ea4d83b66c35cf222ad # Parent f60360209e5cb476ade8cddd9b10fdd72d219a80 * somewhat clearer layout in region layer diff -r f60360209e5c -r 6441b31b37ac data/model/IntervalModel.h --- 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::PointList getPoints(long frame) const; + virtual const typename SparseModel::PointList &getPoints() const { + return SparseModel::getPoints(); + } + /** * TabularModel methods. */ diff -r f60360209e5c -r 6441b31b37ac data/model/RegionModel.h --- 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(sampleRate, resolution, valueMinimum, valueMaximum, notifyOnAdd), diff -r f60360209e5c -r 6441b31b37ac data/model/SparseModel.h --- 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 +const typename SparseModel::PointList & +SparseModel::getPoints() const +{ + return m_points; +} + +template typename SparseModel::PointList SparseModel::getPoints(long start, long end) const {