Mercurial > hg > svcore
comparison data/fft/FFTDataServer.h @ 678:948271d124ac
Make more (though still not entirely) robust in the face of running out of disc space
author | Chris Cannam |
---|---|
date | Thu, 14 Apr 2011 15:20:27 +0100 |
parents | 53e5dc8439e7 |
children | 59e7fe1b1003 |
comparison
equal
deleted
inserted
replaced
677:ce73529405e4 | 678:948271d124ac |
---|---|
104 } | 104 } |
105 bool isOverThreshold(size_t x, size_t y, float threshold) { | 105 bool isOverThreshold(size_t x, size_t y, float threshold) { |
106 return getMagnitudeAt(x, y) > threshold; | 106 return getMagnitudeAt(x, y) > threshold; |
107 } | 107 } |
108 | 108 |
109 QString getError() const; | |
109 size_t getFillCompletion() const; | 110 size_t getFillCompletion() const; |
110 size_t getFillExtent() const; | 111 size_t getFillExtent() const; |
111 | 112 |
112 private: | 113 private: |
113 FFTDataServer(QString fileBaseName, | 114 FFTDataServer(QString fileBaseName, |
244 m_server(server), m_extent(0), m_completion(0), | 245 m_server(server), m_extent(0), m_completion(0), |
245 m_fillFrom(fillFromColumn) { } | 246 m_fillFrom(fillFromColumn) { } |
246 | 247 |
247 size_t getExtent() const { return m_extent; } | 248 size_t getExtent() const { return m_extent; } |
248 size_t getCompletion() const { return m_completion ? m_completion : 1; } | 249 size_t getCompletion() const { return m_completion ? m_completion : 1; } |
250 QString getError() const { return m_error; } | |
249 virtual void run(); | 251 virtual void run(); |
250 | 252 |
251 protected: | 253 protected: |
252 FFTDataServer &m_server; | 254 FFTDataServer &m_server; |
253 size_t m_extent; | 255 size_t m_extent; |
254 size_t m_completion; | 256 size_t m_completion; |
255 size_t m_fillFrom; | 257 size_t m_fillFrom; |
258 QString m_error; | |
256 }; | 259 }; |
257 | 260 |
258 bool m_exiting; | 261 bool m_exiting; |
259 bool m_suspended; | 262 bool m_suspended; |
260 FillThread *m_fillThread; | 263 FillThread *m_fillThread; |
264 QString m_error; | |
261 | 265 |
262 void deleteProcessingData(); | 266 void deleteProcessingData(); |
263 void fillColumn(size_t x); | 267 void fillColumn(size_t x); |
264 void fillComplete(); | 268 void fillComplete(); |
265 | 269 |