comparison data/model/WritableWaveFileModel.h @ 1580:c01cbe41aeb5 fix-static-analysis

Use override throughout
author Chris Cannam
date Mon, 26 Nov 2018 13:48:45 +0000
parents 954d0cf29ca7
children 82d03c9661f9
comparison
equal deleted inserted replaced
1579:232d6ddf257d 1580:c01cbe41aeb5
136 * Get the proportion of the file which has been written so far, 136 * Get the proportion of the file which has been written so far,
137 * as a percentage. Return PROPORTION_UNKNOWN if unknown. 137 * as a percentage. Return PROPORTION_UNKNOWN if unknown.
138 */ 138 */
139 int getWriteProportion() const; 139 int getWriteProportion() const;
140 140
141 bool isOK() const; 141 bool isOK() const override;
142 bool isReady(int *) const; 142 bool isReady(int *) const override;
143 143
144 /** 144 /**
145 * Return the generation completion percentage of this model. This 145 * Return the generation completion percentage of this model. This
146 * is always 100, because the model is always in a complete state 146 * is always 100, because the model is always in a complete state
147 * -- it just contains varying amounts of data depending on how 147 * -- it just contains varying amounts of data depending on how
148 * much has been written. 148 * much has been written.
149 */ 149 */
150 virtual int getCompletion() const { return 100; } 150 virtual int getCompletion() const { return 100; }
151 151
152 const ZoomConstraint *getZoomConstraint() const { 152 const ZoomConstraint *getZoomConstraint() const override {
153 static PowerOfSqrtTwoZoomConstraint zc; 153 static PowerOfSqrtTwoZoomConstraint zc;
154 return &zc; 154 return &zc;
155 } 155 }
156 156
157 sv_frame_t getFrameCount() const; 157 sv_frame_t getFrameCount() const override;
158 int getChannelCount() const { return m_channels; } 158 int getChannelCount() const override { return m_channels; }
159 sv_samplerate_t getSampleRate() const { return m_sampleRate; } 159 sv_samplerate_t getSampleRate() const override { return m_sampleRate; }
160 sv_samplerate_t getNativeRate() const { return m_sampleRate; } 160 sv_samplerate_t getNativeRate() const override { return m_sampleRate; }
161 161
162 QString getTitle() const { 162 QString getTitle() const override {
163 if (m_model) return m_model->getTitle(); 163 if (m_model) return m_model->getTitle();
164 else return ""; 164 else return "";
165 } 165 }
166 QString getMaker() const { 166 QString getMaker() const override {
167 if (m_model) return m_model->getMaker(); 167 if (m_model) return m_model->getMaker();
168 else return ""; 168 else return "";
169 } 169 }
170 QString getLocation() const { 170 QString getLocation() const override {
171 if (m_model) return m_model->getLocation(); 171 if (m_model) return m_model->getLocation();
172 else return ""; 172 else return "";
173 } 173 }
174 174
175 float getValueMinimum() const { return -1.0f; } 175 float getValueMinimum() const override { return -1.0f; }
176 float getValueMaximum() const { return 1.0f; } 176 float getValueMaximum() const override { return 1.0f; }
177 177
178 virtual sv_frame_t getStartFrame() const { return m_startFrame; } 178 sv_frame_t getStartFrame() const override { return m_startFrame; }
179 virtual sv_frame_t getEndFrame() const { return m_startFrame + getFrameCount(); } 179 sv_frame_t getEndFrame() const override { return m_startFrame + getFrameCount(); }
180 180
181 void setStartFrame(sv_frame_t startFrame); 181 void setStartFrame(sv_frame_t startFrame) override;
182 182
183 virtual floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const; 183 floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const override;
184 184
185 virtual std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const; 185 std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const override;
186 186
187 virtual int getSummaryBlockSize(int desired) const; 187 int getSummaryBlockSize(int desired) const override;
188 188
189 virtual void getSummaries(int channel, sv_frame_t start, sv_frame_t count, 189 void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
190 RangeBlock &ranges, int &blockSize) const; 190 RangeBlock &ranges, int &blockSize) const override;
191 191
192 virtual Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const; 192 Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const override;
193 193
194 QString getTypeName() const { return tr("Writable Wave File"); } 194 QString getTypeName() const override { return tr("Writable Wave File"); }
195 195
196 virtual void toXml(QTextStream &out, 196 void toXml(QTextStream &out,
197 QString indent = "", 197 QString indent = "",
198 QString extraAttributes = "") const; 198 QString extraAttributes = "") const override;
199 199
200 protected: 200 protected:
201 ReadOnlyWaveFileModel *m_model; 201 ReadOnlyWaveFileModel *m_model;
202 202
203 /** When normalising, this writer is used to write verbatim 203 /** When normalising, this writer is used to write verbatim