comparison transform/Transform.h @ 1163:d094598f84bd

Better error reporting for transform load (from RDF and XML)
author Chris Cannam
date Thu, 25 Feb 2016 10:53:10 +0000
parents a2dbedc0cfee
children c01cbe41aeb5
comparison
equal deleted inserted replaced
1162:1dd98a5432cf 1163:d094598f84bd
44 */ 44 */
45 Transform(); 45 Transform();
46 46
47 /** 47 /**
48 * Construct a Transform by parsing the given XML data string. 48 * Construct a Transform by parsing the given XML data string.
49 * This is the inverse of toXml. 49 * This is the inverse of toXml. If this fails, getErrorString()
50 * will return a non-empty string.
50 */ 51 */
51 Transform(QString xml); 52 Transform(QString xml);
52 53
53 virtual ~Transform(); 54 virtual ~Transform();
54 55
154 * ensure you start from an empty transform rather than one that 155 * ensure you start from an empty transform rather than one that
155 * has already been configured. 156 * has already been configured.
156 */ 157 */
157 void setFromXmlAttributes(const QXmlAttributes &); 158 void setFromXmlAttributes(const QXmlAttributes &);
158 159
160 QString getErrorString() const { return m_errorString; }
161
159 static SummaryType stringToSummaryType(QString); 162 static SummaryType stringToSummaryType(QString);
160 static QString summaryTypeToString(SummaryType); 163 static QString summaryTypeToString(SummaryType);
161 164
162 protected: 165 protected:
163 TransformId m_id; // pluginid:output, that is type:soname:label:output 166 TransformId m_id; // pluginid:output, that is type:soname:label:output
193 int m_blockSize; 196 int m_blockSize;
194 WindowType m_windowType; 197 WindowType m_windowType;
195 RealTime m_startTime; 198 RealTime m_startTime;
196 RealTime m_duration; 199 RealTime m_duration;
197 sv_samplerate_t m_sampleRate; 200 sv_samplerate_t m_sampleRate;
201 QString m_errorString;
198 }; 202 };
199 203
200 typedef std::vector<Transform> Transforms; 204 typedef std::vector<Transform> Transforms;
201 205
202 #endif 206 #endif