##// END OF EJS Templates
Uses new iterator in DataSeries.cpp...
Uses new iterator in DataSeries.cpp The code of the old iterator is deleted. The new iterator is now built from the Implementation of DataSeriesIteratorValue :: Impl for a DataSeries

File last commit:

r561:df3e79308ca8
r596:96f73c42ec59
Show More
ScalarSeries.cpp
31 lines | 1.1 KiB | text/x-c | CppLexer
/ core / src / Data / ScalarSeries.cpp
Alexandre Leroux
Creates scalar series
r126 #include <Data/ScalarSeries.h>
Alexandre Leroux
Creates constructor for ScalarSeries that directly takes vectors...
r392 ScalarSeries::ScalarSeries(QVector<double> xAxisData, QVector<double> valuesData,
const Unit &xAxisUnit, const Unit &valuesUnit)
: DataSeries{std::make_shared<ArrayData<1> >(std::move(xAxisData)), xAxisUnit,
std::make_shared<ArrayData<1> >(std::move(valuesData)), valuesUnit}
{
}
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r310 std::unique_ptr<IDataSeries> ScalarSeries::clone() const
{
return std::make_unique<ScalarSeries>(*this);
}
Implementation of V5 acquisition
r539
Alexandre Leroux
Renames subData() to subDataSeries()...
r554 std::shared_ptr<IDataSeries> ScalarSeries::subDataSeries(const SqpRange &range)
Implementation of V5 acquisition
r539 {
auto subXAxisData = QVector<double>();
auto subValuesData = QVector<double>();
this->lockRead();
{
Alexandre Leroux
Creates vector series...
r561 auto bounds = subData(range.m_TStart, range.m_TEnd);
for (auto it = bounds.first; it != bounds.second; ++it) {
subXAxisData.append(it->x());
subValuesData.append(it->value());
Implementation of V5 acquisition
r539 }
}
this->unlock();
return std::make_shared<ScalarSeries>(subXAxisData, subValuesData, this->xAxisUnit(),
this->valuesUnit());
}