IDataProvider.h
39 lines
| 991 B
| text/x-c
|
CLexer
Alexandre Leroux
|
r114 | #ifndef SCIQLOP_IDATAPROVIDER_H | ||
#define SCIQLOP_IDATAPROVIDER_H | ||||
#include <memory> | ||||
Alexandre Leroux
|
r157 | #include <QObject> | ||
r217 | #include <Data/SqpDateTime.h> | |||
Alexandre Leroux
|
r114 | class DataProviderParameters; | ||
class IDataSeries; | ||||
/** | ||||
* @brief The IDataProvider interface aims to declare a data provider. | ||||
* | ||||
* A data provider is an entity that generates data and returns it according to various parameters | ||||
* (time interval, product to retrieve the data, etc.) | ||||
* | ||||
* @sa IDataSeries | ||||
*/ | ||||
r217 | class IDataProvider : public QObject { | |||
Q_OBJECT | ||||
Alexandre Leroux
|
r114 | public: | ||
virtual ~IDataProvider() noexcept = default; | ||||
virtual std::unique_ptr<IDataSeries> | ||||
retrieveData(const DataProviderParameters ¶meters) const = 0; | ||||
r217 | ||||
virtual void requestDataLoading(const QVector<SqpDateTime> &dateTimeList) = 0; | ||||
signals: | ||||
r227 | void dataProvided(std::shared_ptr<IDataSeries> dateSerie, const SqpDateTime &dateTime); | |||
r217 | }; | |||
Alexandre Leroux
|
r157 | // Required for using shared_ptr in signals/slots | ||
Q_DECLARE_METATYPE(std::shared_ptr<IDataProvider>) | ||||
Alexandre Leroux
|
r114 | #endif // SCIQLOP_IDATAPROVIDER_H | ||