##// END OF EJS Templates
Updates IDataProvider::requestDataLoading() method's signature...
Updates IDataProvider::requestDataLoading() method's signature The parameters needed for data retrieval are passed to a DataProviderParameters object. For now, it concerns only the list of datetimes to process, but the object will be completed with extra data which may be necessary for certain providers

File last commit:

r330:8a4deb8c70cd
r375:49f712bf7e59
Show More
DataSourceController.h
90 lines | 3.6 KiB | text/x-c | CLexer
/ core / include / DataSource / DataSourceController.h
Initialisation de l'application multithread avec le spimpl....
r21 #ifndef SCIQLOP_DATASOURCECONTROLLER_H
#define SCIQLOP_DATASOURCECONTROLLER_H
#include <QLoggingCategory>
#include <QObject>
Alexandre Leroux
Enables the registration of a data source in the controller
r36 #include <QUuid>
Initialisation de l'application multithread avec le spimpl....
r21
#include <Common/spimpl.h>
Q_DECLARE_LOGGING_CATEGORY(LOG_DataSourceController)
Alexandre Leroux
Implements the method for setting data source structure
r37 class DataSourceItem;
Alexandre Leroux
Adds method for registering a data provider in the data source controller
r119 class IDataProvider;
Alexandre Leroux
Implements the method for setting data source structure
r37
Initialisation de l'application multithread avec le spimpl....
r21 /**
Alexandre Leroux
Enables the registration of a data source in the controller
r36 * @brief The DataSourceController class aims to make the link between SciQlop and its plugins. This
* is the intermediate class that SciQlop has to use in the way to connect a data source. Please
* first use register method to initialize a plugin specified by its metadata name (JSON plugin
* source) then others specifics method will be able to access it. You can load a data source driver
* plugin then create a data source.
Initialisation de l'application multithread avec le spimpl....
r21 */
class DataSourceController : public QObject {
Q_OBJECT
public:
explicit DataSourceController(QObject *parent = 0);
virtual ~DataSourceController();
Alexandre Leroux
Enables the registration of a data source in the controller
r36 /**
* Registers a data source. The method delivers a unique id that can be used afterwards to
* access to the data source properties (structure, connection parameters, data provider, etc.)
* @param dataSourceName the name of the data source
* @return the unique id with which the data source has been registered
*/
QUuid registerDataSource(const QString &dataSourceName) noexcept;
Alexandre Leroux
Implements the method for setting data source structure
r37 /**
* Sets the structure of a data source. The controller takes ownership of the structure.
* @param dataSourceUid the unique id with which the data source has been registered into the
* controller. If it is invalid, the method has no effect.
Alexandre Leroux
Minor fix
r330 * @param dataSourceItem the structure of the data source. It must be not null to be registered
Alexandre Leroux
Implements the method for setting data source structure
r37 * @sa registerDataSource()
*/
void setDataSourceItem(const QUuid &dataSourceUid,
std::unique_ptr<DataSourceItem> dataSourceItem) noexcept;
Alexandre Leroux
Adds method for registering a data provider in the data source controller
r119 /**
* Sets the data provider used to retrieve data from of a data source. The controller takes
* ownership of the provider.
* @param dataSourceUid the unique id with which the data source has been registered into the
* controller. If it is invalid, the method has no effect.
* @param dataProvider the provider of the data source
* @sa registerDataSource()
*/
void setDataProvider(const QUuid &dataSourceUid,
std::unique_ptr<IDataProvider> dataProvider) noexcept;
Alexandre Leroux
Adds action in the mock plugin to load products
r137 /**
* Loads an item (product) as a variable in SciQlop
Alexandre Leroux
Updates DataSourceController::loadProductItem() method...
r155 * @param dataSourceUid the unique id of the data source containing the item. It is used to get
* the data provider associated to the data source, and pass it to for the variable creation
Alexandre Leroux
Adds action in the mock plugin to load products
r137 * @param productItem the item to load
*/
Alexandre Leroux
Updates DataSourceController::loadProductItem() method...
r155 void loadProductItem(const QUuid &dataSourceUid, const DataSourceItem &productItem) noexcept;
Alexandre Leroux
Adds action in the mock plugin to load products
r137
Initialisation de l'application multithread avec le spimpl....
r21 public slots:
/// Manage init/end of the controller
void initialize();
void finalize();
Alexandre Leroux
Implements the method for setting data source structure
r37 signals:
/// Signal emitted when a structure has been set for a data source
Alexandre Leroux
Change signal/slot signature for data source
r90 void dataSourceItemSet(DataSourceItem *dataSourceItem);
Alexandre Leroux
Implements the method for setting data source structure
r37
Alexandre Leroux
Makes the connection between Data source controller and Variable controller...
r157 /**
* Signal emitted when a variable creation is asked for a product
* @param variableName the name of the variable
* @param variableProvider the provider that will be used to retrieve the data of the variable
* (can be null)
*/
void variableCreationRequested(const QString &variableName,
std::shared_ptr<IDataProvider> variableProvider);
Initialisation de l'application multithread avec le spimpl....
r21 private:
void waitForFinish();
class DataSourceControllerPrivate;
spimpl::unique_impl_ptr<DataSourceControllerPrivate> impl;
};
#endif // SCIQLOP_DATASOURCECONTROLLER_H