diff --git a/core/include/Data/DataProviderParameters.h b/core/include/Data/DataProviderParameters.h index 496f171..07df203 100644 --- a/core/include/Data/DataProviderParameters.h +++ b/core/include/Data/DataProviderParameters.h @@ -1,16 +1,15 @@ #ifndef SCIQLOP_DATAPROVIDERPARAMETERS_H #define SCIQLOP_DATAPROVIDERPARAMETERS_H +#include "SqpDateTime.h" + /** * @brief The DataProviderParameters struct holds the information needed to retrieve data from a * data provider * @sa IDataProvider */ struct DataProviderParameters { - /// Start time - double m_TStart; - /// End time - double m_TEnd; + SqpDateTime m_Time; }; #endif // SCIQLOP_DATAPROVIDERPARAMETERS_H diff --git a/core/include/Data/SqpDateTime.h b/core/include/Data/SqpDateTime.h new file mode 100644 index 0000000..34f9aa3 --- /dev/null +++ b/core/include/Data/SqpDateTime.h @@ -0,0 +1,15 @@ +#ifndef SCIQLOP_SQPDATETIME_H +#define SCIQLOP_SQPDATETIME_H + +/** + * @brief The SqpDateTime struct holds the information of time parameters + * @sa SqpDateTime + */ +struct SqpDateTime { + /// Start time + double m_TStart; + /// End time + double m_TEnd; +}; + +#endif // SCIQLOP_SQPDATETIME_H diff --git a/plugins/mockplugin/src/CosinusProvider.cpp b/plugins/mockplugin/src/CosinusProvider.cpp index 24cc69a..44e159c 100644 --- a/plugins/mockplugin/src/CosinusProvider.cpp +++ b/plugins/mockplugin/src/CosinusProvider.cpp @@ -8,9 +8,11 @@ std::unique_ptr CosinusProvider::retrieveData(const DataProviderParameters ¶meters) const { + auto dateTime = parameters.m_Time; + // Gets the timerange from the parameters - auto start = parameters.m_TStart; - auto end = parameters.m_TEnd; + auto start = dateTime.m_TStart; + auto end = dateTime.m_TEnd; // We assure that timerange is valid if (end < start) {