##// END OF EJS Templates
Merge branch 'feature/ArrayDataTests' into develop
Merge branch 'feature/ArrayDataTests' into develop

File last commit:

r512:d00d6fd96c10
r521:09ae4b54cb70 merge
Show More
Variable.cpp
86 lines | 2.1 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>
Change SqpRange for SqpDateTime
r512 #include <Data/SqpRange.h>
Variable slot is called when x range of its graph changed
r226
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 {
Change SqpRange for SqpDateTime
r512 explicit VariablePrivate(const QString &name, const SqpRange &dateTime,
Alexandre Leroux
Adds QVariantHash to store metadata in a variable
r406 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
Change SqpRange for SqpDateTime
r512 SqpRange 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 };
Change SqpRange for SqpDateTime
r512 Variable::Variable(const QString &name, const SqpRange &dateTime, const QVariantHash &metadata)
Alexandre Leroux
Adds QVariantHash to store metadata in a variable
r406 : 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;
}
Change SqpRange for SqpDateTime
r512 SqpRange Variable::dateTime() const noexcept
The mock plugin can now create data with view operation
r235 {
return impl->m_DateTime;
}
Change SqpRange for SqpDateTime
r512 void Variable::setDateTime(const SqpRange &dateTime) noexcept
Implementation of the new Dela T computation strategy
r260 {
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 {
The mock plugin can now create data with view operation
r235 impl->m_DataSeries->merge(dataSeries.get());
Implementation of the cache feature : download before display needs
r433 // 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;
}
Change SqpRange for SqpDateTime
r512 bool Variable::contains(const SqpRange &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
Change SqpRange for SqpDateTime
r512 bool Variable::intersect(const SqpRange &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
Change SqpRange for SqpDateTime
r512 bool Variable::isInside(const SqpRange &dateTime) const noexcept
The cache is now updated only if date requested has been successfully...
r318 {
Change SqpRange for SqpDateTime
r512 return dateTime.contains(SqpRange{impl->m_DateTime.m_TStart, impl->m_DateTime.m_TEnd});
The cache is now updated only if date requested has been successfully...
r318 }