DataSeriesIterator.cpp
84 lines
| 1.8 KiB
| text/x-c
|
CppLexer
|
r557 | #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) | ||||
{ | ||||
|
r627 | m_Impl->swap(*other.m_Impl); | ||
|
r557 | return *this; | ||
} | ||||
|
r640 | int DataSeriesIteratorValue::distance(const DataSeriesIteratorValue &other) const | ||
{ | ||||
auto dist = m_Impl->distance(*other.m_Impl); | ||||
return m_Impl->distance(*other.m_Impl); | ||||
} | ||||
|
r557 | bool DataSeriesIteratorValue::equals(const DataSeriesIteratorValue &other) const | ||
{ | ||||
return m_Impl->equals(*other.m_Impl); | ||||
} | ||||
|
r640 | 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)}; | ||||
} | ||||
|
r647 | void DataSeriesIteratorValue::next(int offset) | ||
|
r557 | { | ||
|
r647 | m_Impl->next(offset); | ||
|
r557 | } | ||
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); | ||||
} | ||||
|
r570 | double DataSeriesIteratorValue::minValue() const | ||
{ | ||||
return m_Impl->minValue(); | ||||
} | ||||
double DataSeriesIteratorValue::maxValue() const | ||||
{ | ||||
return m_Impl->maxValue(); | ||||
} | ||||
|
r621 | |||
QVector<double> DataSeriesIteratorValue::values() const | ||||
{ | ||||
return m_Impl->values(); | ||||
} | ||||
|
r627 | |||
DataSeriesIteratorValue::Impl *DataSeriesIteratorValue::impl() | ||||
{ | ||||
return m_Impl.get(); | ||||
} | ||||