comparison data/model/ReadOnlyWaveFileModel.h @ 1671:82d03c9661f9 single-point

Rework isReady()/getCompletion() on models. Previously the new overhauled models were implementing getCompletion() but inheriting a version of isReady() (from the Model base) that didn't call it, referring only to isOK(). So they were reporting completion as soon as they had begun. Instead hoist getCompletion() to abstract base and call it from Model::isReady().
author Chris Cannam
date Wed, 27 Mar 2019 13:15:16 +0000
parents c01cbe41aeb5
children 78fe29adfd16
comparison
equal deleted inserted replaced
1670:623231712470 1671:82d03c9661f9
52 52
53 ~ReadOnlyWaveFileModel(); 53 ~ReadOnlyWaveFileModel();
54 54
55 bool isOK() const override; 55 bool isOK() const override;
56 bool isReady(int *) const override; 56 bool isReady(int *) const override;
57 int getCompletion() const override {
58 int c = 0;
59 (void)isReady(&c);
60 return c;
61 }
57 62
58 const ZoomConstraint *getZoomConstraint() const override { return &m_zoomConstraint; } 63 const ZoomConstraint *getZoomConstraint() const override { return &m_zoomConstraint; }
59 64
60 sv_frame_t getFrameCount() const override; 65 sv_frame_t getFrameCount() const override;
61 int getChannelCount() const override; 66 int getChannelCount() const override;