##// END OF EJS Templates
Spectrograms implementation (1)...
Alexandre Leroux -
r949:2da9b0f28a10
parent child
Show More
@@ -12,7 +12,7 class IDataSeries;
12 12 Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaResultParser)
13 13
14 14 struct SCIQLOP_AMDA_EXPORT AmdaResultParser {
15 enum class ValueType { SCALAR, VECTOR, UNKNOWN };
15 enum class ValueType { SCALAR, SPECTROGRAM, VECTOR, UNKNOWN };
16 16
17 17 static std::shared_ptr<IDataSeries> readTxt(const QString &filePath,
18 18 ValueType valueType) noexcept;
@@ -65,6 +65,17 private:
65 65 };
66 66
67 67 /**
68 * Implementation of @sa IAmdaResultParserHelper for spectrograms
69 */
70 class SpectrogramParserHelper : public IAmdaResultParserHelper {
71 public:
72 bool checkProperties() override;
73 std::shared_ptr<IDataSeries> createSeries() override;
74 void readPropertyLine(const QString &line) override;
75 void readResultLine(const QString &line) override;
76 };
77
78 /**
68 79 * Implementation of @sa IAmdaResultParserHelper for vectors
69 80 */
70 81 class VectorParserHelper : public IAmdaResultParserHelper {
@@ -61,6 +61,9 AmdaResultParser::ValueType valueType(const QString &valueType)
61 61 if (valueType == QStringLiteral("scalar")) {
62 62 return AmdaResultParser::ValueType::SCALAR;
63 63 }
64 else if (valueType == QStringLiteral("spectrogram")) {
65 return AmdaResultParser::ValueType::SPECTROGRAM;
66 }
64 67 else if (valueType == QStringLiteral("vector")) {
65 68 return AmdaResultParser::ValueType::VECTOR;
66 69 }
@@ -29,6 +29,8 std::unique_ptr<IAmdaResultParserHelper> createHelper(AmdaResultParser::ValueTyp
29 29 switch (valueType) {
30 30 case AmdaResultParser::ValueType::SCALAR:
31 31 return std::make_unique<ScalarParserHelper>();
32 case AmdaResultParser::ValueType::SPECTROGRAM:
33 return std::make_unique<SpectrogramParserHelper>();
32 34 case AmdaResultParser::ValueType::VECTOR:
33 35 return std::make_unique<VectorParserHelper>();
34 36 case AmdaResultParser::ValueType::UNKNOWN:
@@ -201,6 +201,30 std::vector<int> ScalarParserHelper::valuesIndexes() const
201 201 return result;
202 202 }
203 203
204 // /////////////////////// //
205 // SpectrogramParserHelper //
206 // /////////////////////// //
207
208 bool SpectrogramParserHelper::checkProperties()
209 {
210 /// @todo ALX
211 }
212
213 std::shared_ptr<IDataSeries> SpectrogramParserHelper::createSeries()
214 {
215 /// @todo ALX
216 }
217
218 void SpectrogramParserHelper::readPropertyLine(const QString &line)
219 {
220 /// @todo ALX
221 }
222
223 void SpectrogramParserHelper::readResultLine(const QString &line)
224 {
225 /// @todo ALX
226 }
227
204 228 // ////////////////// //
205 229 // VectorParserHelper //
206 230 // ////////////////// //
General Comments 0
You need to be logged in to leave comments. Login now