@@ -77,6 +77,13 public: | |||||
77 | } |
|
77 | } | |
78 | } |
|
78 | } | |
79 |
|
79 | |||
|
80 | void prev() | |||
|
81 | { | |||
|
82 | for (auto &it : m_Its) { | |||
|
83 | --it; | |||
|
84 | } | |||
|
85 | } | |||
|
86 | ||||
80 | bool operator==(const IteratorValue &other) const { return m_Its == other.m_Its; } |
|
87 | bool operator==(const IteratorValue &other) const { return m_Its == other.m_Its; } | |
81 |
|
88 | |||
82 | private: |
|
89 | private: | |
@@ -105,6 +112,12 public: | |||||
105 | return *this; |
|
112 | return *this; | |
106 | } |
|
113 | } | |
107 |
|
114 | |||
|
115 | Iterator &operator--() | |||
|
116 | { | |||
|
117 | m_CurrentValue.prev(); | |||
|
118 | return *this; | |||
|
119 | } | |||
|
120 | ||||
108 | pointer operator->() const { return &m_CurrentValue; } |
|
121 | pointer operator->() const { return &m_CurrentValue; } | |
109 | reference operator*() const { return m_CurrentValue; } |
|
122 | reference operator*() const { return m_CurrentValue; } | |
110 |
|
123 |
@@ -191,7 +191,7 public: | |||||
191 | std::make_unique<dataseries_detail::IteratorValue<Dim> >(*this, false)}}; |
|
191 | std::make_unique<dataseries_detail::IteratorValue<Dim> >(*this, false)}}; | |
192 | } |
|
192 | } | |
193 |
|
193 | |||
194 | std::pair<Iterator, Iterator> subData(double min, double max) const |
|
194 | std::pair<DataSeriesIterator, DataSeriesIterator> subData(double min, double max) const override | |
195 | { |
|
195 | { | |
196 | if (min > max) { |
|
196 | if (min > max) { | |
197 | std::swap(min, max); |
|
197 | std::swap(min, max); |
@@ -2,6 +2,7 | |||||
2 | #define SCIQLOP_IDATASERIES_H |
|
2 | #define SCIQLOP_IDATASERIES_H | |
3 |
|
3 | |||
4 | #include <Common/MetaTypes.h> |
|
4 | #include <Common/MetaTypes.h> | |
|
5 | #include <Data/DataSeriesIterator.h> | |||
5 | #include <Data/SqpRange.h> |
|
6 | #include <Data/SqpRange.h> | |
6 |
|
7 | |||
7 | #include <memory> |
|
8 | #include <memory> | |
@@ -62,6 +63,20 public: | |||||
62 | virtual std::unique_ptr<IDataSeries> clone() const = 0; |
|
63 | virtual std::unique_ptr<IDataSeries> clone() const = 0; | |
63 | virtual SqpRange range() const = 0; |
|
64 | virtual SqpRange range() const = 0; | |
64 |
|
65 | |||
|
66 | // ///////// // | |||
|
67 | // Iterators // | |||
|
68 | // ///////// // | |||
|
69 | ||||
|
70 | virtual DataSeriesIterator cbegin() const = 0; | |||
|
71 | virtual DataSeriesIterator cend() const = 0; | |||
|
72 | ||||
|
73 | virtual std::pair<DataSeriesIterator, DataSeriesIterator> subData(double min, | |||
|
74 | double max) const = 0; | |||
|
75 | ||||
|
76 | // /////// // | |||
|
77 | // Mutexes // | |||
|
78 | // /////// // | |||
|
79 | ||||
65 | virtual void lockRead() = 0; |
|
80 | virtual void lockRead() = 0; | |
66 | virtual void lockWrite() = 0; |
|
81 | virtual void lockWrite() = 0; | |
67 | virtual void unlock() = 0; |
|
82 | virtual void unlock() = 0; |
General Comments 0
You need to be logged in to leave comments.
Login now