##// 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:

r406:643df4da22dc
r408:49f712bf7e59
Show More
Variable.cpp
90 lines | 2.3 KiB | text/x-c | CppLexer
Alexandre Leroux
Changes Variable from struct to class
r163 #include "Variable/Variable.h"
Alexandre Leroux
Adds data series to a variable
r164 #include <Data/IDataSeries.h>
Variable slot is called when x range of its graph changed
r226 #include <Data/SqpDateTime.h>
Add current progression for thread fix
r364 #include <QReadWriteLock>
#include <QThread>
Variable slot is called when x range of its graph changed
r226 Q_LOGGING_CATEGORY(LOG_Variable, "Variable")
Alexandre Leroux
Adds data series to a variable
r164
Alexandre Leroux
Changes Variable from struct to class
r163 struct Variable::VariablePrivate {
Alexandre Leroux
Adds QVariantHash to store metadata in a variable
r406 explicit VariablePrivate(const QString &name, const SqpDateTime &dateTime,
const QVariantHash &metadata)
: m_Name{name}, m_DateTime{dateTime}, m_Metadata{metadata}, m_DataSeries{nullptr}
Alexandre Leroux
Changes Variable from struct to class
r163 {
}
QString m_Name;
Variable slot is called when x range of its graph changed
r226
SqpDateTime m_DateTime; // The dateTime available in the view and loaded. not the cache.
Alexandre Leroux
Adds QVariantHash to store metadata in a variable
r406 QVariantHash m_Metadata;
Alexandre Leroux
Adds data series to a variable
r164 std::unique_ptr<IDataSeries> m_DataSeries;
Alexandre Leroux
Changes Variable from struct to class
r163 };
Alexandre Leroux
Adds QVariantHash to store metadata in a variable
r406 Variable::Variable(const QString &name, const SqpDateTime &dateTime, const QVariantHash &metadata)
: impl{spimpl::make_unique_impl<VariablePrivate>(name, dateTime, metadata)}
Alexandre Leroux
Changes Variable from struct to class
r163 {
}
QString Variable::name() const noexcept
{
return impl->m_Name;
}
The mock plugin can now create data with view operation
r235 SqpDateTime Variable::dateTime() const noexcept
{
return impl->m_DateTime;
}
Implementation of the new Dela T computation strategy
r260 void Variable::setDateTime(const SqpDateTime &dateTime) noexcept
{
impl->m_DateTime = dateTime;
}
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r310 void Variable::setDataSeries(std::shared_ptr<IDataSeries> dataSeries) noexcept
Alexandre Leroux
Adds data series to a variable
r164 {
Change info to debug on thread display log
r367 qCDebug(LOG_Variable()) << "Variable::setDataSeries" << QThread::currentThread()->objectName();
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r310 if (!dataSeries) {
/// @todo ALX : log
return;
Alexandre Leroux
Adds data series to a variable
r164 }
The mock plugin can now create data with view operation
r235
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r310 // Inits the data series of the variable
if (!impl->m_DataSeries) {
impl->m_DataSeries = dataSeries->clone();
}
else {
Add current progression for thread fix
r364 dataSeries->lockWrite();
impl->m_DataSeries->lockWrite();
The mock plugin can now create data with view operation
r235 impl->m_DataSeries->merge(dataSeries.get());
Add current progression for thread fix
r364 impl->m_DataSeries->unlock();
dataSeries->unlock();
Fix the cosinus bug....
r298 emit updated();
The mock plugin can now create data with view operation
r235 }
Alexandre Leroux
Adds data series to a variable
r164 }
Alexandre Leroux
Handles creations for scalar series
r182
IDataSeries *Variable::dataSeries() const noexcept
{
return impl->m_DataSeries.get();
}
Variable slot is called when x range of its graph changed
r226
Alexandre Leroux
Adds QVariantHash to store metadata in a variable
r406 QVariantHash Variable::metadata() const noexcept
{
return impl->m_Metadata;
}
The cache is now updated only if date requested has been successfully...
r318 bool Variable::contains(const SqpDateTime &dateTime) const noexcept
Variable slot is called when x range of its graph changed
r226 {
Implementation of the new Dela T computation strategy
r260 return impl->m_DateTime.contains(dateTime);
Variable slot is called when x range of its graph changed
r226 }
Add intersect méthode on variable and sqpDateTime...
r258
The cache is now updated only if date requested has been successfully...
r318 bool Variable::intersect(const SqpDateTime &dateTime) const noexcept
Add intersect méthode on variable and sqpDateTime...
r258 {
return impl->m_DateTime.intersect(dateTime);
}
The cache is now updated only if date requested has been successfully...
r318
bool Variable::isInside(const SqpDateTime &dateTime) const noexcept
{
return dateTime.contains(SqpDateTime{impl->m_DateTime.m_TStart, impl->m_DateTime.m_TEnd});
}