##// END OF EJS Templates
Parser refactoring (3)...
Parser refactoring (3) Implements properties reading and properties checking Implementation takes some of the basic parser, which will be deleted at the end

File last commit:

r763:fb27cebc64ba
r935:b93a3fb4e7f2
Show More
DataSeriesIterator.cpp
83 lines | 1.7 KiB | text/x-c | CppLexer
/ core / src / Data / DataSeriesIterator.cpp
Alexandre Leroux
Defines an iterator for a data series...
r595 #include "Data/DataSeriesIterator.h"
DataSeriesIteratorValue::DataSeriesIteratorValue(
std::unique_ptr<DataSeriesIteratorValue::Impl> impl)
: m_Impl{std::move(impl)}
{
}
DataSeriesIteratorValue::DataSeriesIteratorValue(const DataSeriesIteratorValue &other)
: m_Impl{other.m_Impl->clone()}
{
}
DataSeriesIteratorValue &DataSeriesIteratorValue::operator=(DataSeriesIteratorValue other)
{
Alexandre Leroux
Adapts iterator to be MoveAssignable...
r674 m_Impl->swap(*other.m_Impl);
Alexandre Leroux
Defines an iterator for a data series...
r595 return *this;
}
Alexandre Leroux
Makes random access iterators...
r689 int DataSeriesIteratorValue::distance(const DataSeriesIteratorValue &other) const
{
return m_Impl->distance(*other.m_Impl);
}
Alexandre Leroux
Defines an iterator for a data series...
r595 bool DataSeriesIteratorValue::equals(const DataSeriesIteratorValue &other) const
{
return m_Impl->equals(*other.m_Impl);
}
Alexandre Leroux
Makes random access iterators...
r689 bool DataSeriesIteratorValue::lowerThan(const DataSeriesIteratorValue &other) const
{
return m_Impl->lowerThan(*other.m_Impl);
}
DataSeriesIteratorValue DataSeriesIteratorValue::advance(int offset) const
{
return DataSeriesIteratorValue{m_Impl->advance(offset)};
}
Alexandre Leroux
Improves random access iterator performance
r697 void DataSeriesIteratorValue::next(int offset)
Alexandre Leroux
Defines an iterator for a data series...
r595 {
Alexandre Leroux
Improves random access iterator performance
r697 m_Impl->next(offset);
Alexandre Leroux
Defines an iterator for a data series...
r595 }
void DataSeriesIteratorValue::prev()
{
m_Impl->prev();
}
double DataSeriesIteratorValue::x() const
{
return m_Impl->x();
}
double DataSeriesIteratorValue::value() const
{
return m_Impl->value();
}
double DataSeriesIteratorValue::value(int componentIndex) const
{
return m_Impl->value(componentIndex);
}
Alexandre Leroux
Implements method to get min/max values of a dataseries giving a range (2)
r609 double DataSeriesIteratorValue::minValue() const
{
return m_Impl->minValue();
}
double DataSeriesIteratorValue::maxValue() const
{
return m_Impl->maxValue();
}
Alexandre Leroux
Adds method into ArrayData and DataSeries iterator to get all values
r667
QVector<double> DataSeriesIteratorValue::values() const
{
return m_Impl->values();
}
Alexandre Leroux
Adapts iterator to be MoveAssignable...
r674
DataSeriesIteratorValue::Impl *DataSeriesIteratorValue::impl()
{
return m_Impl.get();
}