VariableRequest.h
49 lines
| 1.2 KiB
| text/x-c
|
CLexer
r582 | #ifndef SCIQLOP_VARIABLEREQUEST_H | |||
#define SCIQLOP_VARIABLEREQUEST_H | ||||
#include <QObject> | ||||
#include <QUuid> | ||||
#include <Common/MetaTypes.h> | ||||
|
r683 | #include <Data/DataProviderParameters.h> | ||
r582 | #include <Data/IDataSeries.h> | |||
#include <Data/SqpRange.h> | ||||
#include <memory> | ||||
|
r683 | class DataProviderParameters; | ||
class IDataProvider; | ||||
r582 | /** | |||
* @brief The VariableRequest struct holds the information of an acquisition request | ||||
*/ | ||||
struct VariableRequest { | ||||
|
r683 | void addResult(std::shared_ptr<IDataSeries> dataSeries) | ||
{ | ||||
if (!m_Result) { | ||||
m_Result = dataSeries->clone(); | ||||
} | ||||
else { | ||||
m_Result->merge(dataSeries.get()); | ||||
} | ||||
++m_ExecCount; | ||||
} | ||||
bool isFinished() const { return m_ProviderParameters.m_Times.size() == m_ExecCount; } | ||||
// Parameters | ||||
|
r682 | SqpRange m_RangeRequested{INVALID_RANGE}; | ||
SqpRange m_CacheRangeRequested{INVALID_RANGE}; | ||||
|
r683 | std::shared_ptr<IDataProvider> m_Provider{nullptr}; | ||
DataProviderParameters m_ProviderParameters{}; | ||||
// Results | ||||
std::shared_ptr<IDataSeries> m_Result{nullptr}; | ||||
int m_ExecCount{0}; | ||||
r582 | }; | |||
SCIQLOP_REGISTER_META_TYPE(VARIABLEREQUEST_REGISTRY, VariableRequest) | ||||
#endif // SCIQLOP_VARIABLEREQUEST_H | ||||