##// END OF EJS Templates
Spectrograms implementation (1)...
Alexandre Leroux -
r938:f5d1c679d0df
parent child
Show More
@@ -12,7 +12,7 class IDataSeries;
12 Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaResultParser)
12 Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaResultParser)
13
13
14 struct SCIQLOP_AMDA_EXPORT AmdaResultParser {
14 struct SCIQLOP_AMDA_EXPORT AmdaResultParser {
15 enum class ValueType { SCALAR, VECTOR, UNKNOWN };
15 enum class ValueType { SCALAR, SPECTROGRAM, VECTOR, UNKNOWN };
16
16
17 static std::shared_ptr<IDataSeries> readTxt(const QString &filePath,
17 static std::shared_ptr<IDataSeries> readTxt(const QString &filePath,
18 ValueType valueType) noexcept;
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 * Implementation of @sa IAmdaResultParserHelper for vectors
79 * Implementation of @sa IAmdaResultParserHelper for vectors
69 */
80 */
70 class VectorParserHelper : public IAmdaResultParserHelper {
81 class VectorParserHelper : public IAmdaResultParserHelper {
@@ -61,6 +61,9 AmdaResultParser::ValueType valueType(const QString &valueType)
61 if (valueType == QStringLiteral("scalar")) {
61 if (valueType == QStringLiteral("scalar")) {
62 return AmdaResultParser::ValueType::SCALAR;
62 return AmdaResultParser::ValueType::SCALAR;
63 }
63 }
64 else if (valueType == QStringLiteral("spectrogram")) {
65 return AmdaResultParser::ValueType::SPECTROGRAM;
66 }
64 else if (valueType == QStringLiteral("vector")) {
67 else if (valueType == QStringLiteral("vector")) {
65 return AmdaResultParser::ValueType::VECTOR;
68 return AmdaResultParser::ValueType::VECTOR;
66 }
69 }
@@ -29,6 +29,8 std::unique_ptr<IAmdaResultParserHelper> createHelper(AmdaResultParser::ValueTyp
29 switch (valueType) {
29 switch (valueType) {
30 case AmdaResultParser::ValueType::SCALAR:
30 case AmdaResultParser::ValueType::SCALAR:
31 return std::make_unique<ScalarParserHelper>();
31 return std::make_unique<ScalarParserHelper>();
32 case AmdaResultParser::ValueType::SPECTROGRAM:
33 return std::make_unique<SpectrogramParserHelper>();
32 case AmdaResultParser::ValueType::VECTOR:
34 case AmdaResultParser::ValueType::VECTOR:
33 return std::make_unique<VectorParserHelper>();
35 return std::make_unique<VectorParserHelper>();
34 case AmdaResultParser::ValueType::UNKNOWN:
36 case AmdaResultParser::ValueType::UNKNOWN:
@@ -201,6 +201,30 std::vector<int> ScalarParserHelper::valuesIndexes() const
201 return result;
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 // VectorParserHelper //
229 // VectorParserHelper //
206 // ////////////////// //
230 // ////////////////// //
General Comments 0
You need to be logged in to leave comments. Login now