comparison data/model/SparseModel.h @ 1065:0fd3661bcfff tonioni

clone() is never used (therefore presumably never works either)
author Chris Cannam
date Tue, 31 Mar 2015 12:12:31 +0100
parents c9fdd9921146
children 9fc8823a73e9
comparison
equal deleted inserted replaced
1064:c9fdd9921146 1065:0fd3661bcfff
50 virtual bool isOK() const { return true; } 50 virtual bool isOK() const { return true; }
51 virtual sv_frame_t getStartFrame() const; 51 virtual sv_frame_t getStartFrame() const;
52 virtual sv_frame_t getEndFrame() const; 52 virtual sv_frame_t getEndFrame() const;
53 virtual sv_samplerate_t getSampleRate() const { return m_sampleRate; } 53 virtual sv_samplerate_t getSampleRate() const { return m_sampleRate; }
54 54
55 virtual Model *clone() const;
56
57 // Number of frames of the underlying sample rate that this model 55 // Number of frames of the underlying sample rate that this model
58 // is capable of resolving to. For example, if m_resolution == 10 56 // is capable of resolving to. For example, if m_resolution == 10
59 // then every point in this model will be at a multiple of 10 57 // then every point in this model will be at a multiple of 10
60 // sample frames and should be considered to cover a window ending 58 // sample frames and should be considered to cover a window ending
61 // 10 sample frames later. 59 // 10 sample frames later.
547 if (!m_points.empty()) { 545 if (!m_points.empty()) {
548 PointListConstIterator i(m_points.end()); 546 PointListConstIterator i(m_points.end());
549 f = (--i)->frame; 547 f = (--i)->frame;
550 } 548 }
551 return f; 549 return f;
552 }
553
554 template <typename PointType>
555 Model *
556 SparseModel<PointType>::clone() const
557 {
558 return 0; //!!! is this ever used?
559 /*
560 SparseModel<PointType> *model =
561 new SparseModel<PointType>(m_sampleRate, m_resolution, m_notifyOnAdd);
562 model->m_points = m_points;
563 model->m_pointCount = m_pointCount;
564 return model;
565 */
566 } 550 }
567 551
568 template <typename PointType> 552 template <typename PointType>
569 bool 553 bool
570 SparseModel<PointType>::isEmpty() const 554 SparseModel<PointType>::isEmpty() const