comparison data/model/AggregateWaveModel.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 ad5f892c0c4d
children 78fe29adfd16
comparison
equal deleted inserted replaced
1670:623231712470 1671:82d03c9661f9
39 AggregateWaveModel(ChannelSpecList channelSpecs); 39 AggregateWaveModel(ChannelSpecList channelSpecs);
40 ~AggregateWaveModel(); 40 ~AggregateWaveModel();
41 41
42 bool isOK() const override; 42 bool isOK() const override;
43 bool isReady(int *) const override; 43 bool isReady(int *) const override;
44 int getCompletion() const override {
45 int c = 0;
46 (void)isReady(&c);
47 return c;
48 }
44 49
45 QString getTypeName() const override { return tr("Aggregate Wave"); } 50 QString getTypeName() const override { return tr("Aggregate Wave"); }
46 51
47 int getComponentCount() const; 52 int getComponentCount() const;
48 ModelChannelSpec getComponent(int c) const; 53 ModelChannelSpec getComponent(int c) const;