Mercurial > hg > svcore
comparison data/model/Dense3DModelPeakCache.h @ 546:95391b480e17
* Make use of peak cache in spectrogram
author | Chris Cannam |
---|---|
date | Wed, 04 Feb 2009 15:03:42 +0000 |
parents | c603d9439b37 |
children | 59e7fe1b1003 |
comparison
equal
deleted
inserted
replaced
545:c603d9439b37 | 546:95391b480e17 |
---|---|
20 #include "EditableDenseThreeDimensionalModel.h" | 20 #include "EditableDenseThreeDimensionalModel.h" |
21 #include "base/ResizeableBitset.h" | 21 #include "base/ResizeableBitset.h" |
22 | 22 |
23 class Dense3DModelPeakCache : public DenseThreeDimensionalModel | 23 class Dense3DModelPeakCache : public DenseThreeDimensionalModel |
24 { | 24 { |
25 Q_OBJECT | |
26 | |
25 public: | 27 public: |
26 Dense3DModelPeakCache(DenseThreeDimensionalModel *source, | 28 Dense3DModelPeakCache(DenseThreeDimensionalModel *source, |
27 size_t columnsPerPeak); | 29 size_t columnsPerPeak); |
28 ~Dense3DModelPeakCache(); | 30 ~Dense3DModelPeakCache(); |
29 | 31 |
32 virtual bool isOK() const { | |
33 return m_source && m_source->isOK(); | |
34 } | |
35 | |
36 virtual size_t getSampleRate() const { | |
37 return m_source->getSampleRate(); | |
38 } | |
39 | |
40 virtual size_t getStartFrame() const { | |
41 return m_source->getStartFrame(); | |
42 } | |
43 | |
44 virtual size_t getEndFrame() const { | |
45 return m_source->getEndFrame(); | |
46 } | |
47 | |
48 virtual Model *clone() const { | |
49 return new Dense3DModelPeakCache(m_source, m_resolution); | |
50 } | |
51 | |
30 virtual size_t getResolution() const { | 52 virtual size_t getResolution() const { |
31 return m_source->getResolution() * m_resolution; | 53 return m_source->getResolution() * m_resolution; |
32 } | 54 } |
33 | 55 |
34 virtual size_t getWidth() const { | 56 virtual size_t getWidth() const { |