##// END OF EJS Templates
Moves cbegin() and cend() declarations in IDataSeries...
Alexandre Leroux -
r559:f66c81d8ced0
parent child
Show More
@@ -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 87 bool operator==(const IteratorValue &other) const { return m_Its == other.m_Its; }
81 88
82 89 private:
@@ -105,6 +112,12 public:
105 112 return *this;
106 113 }
107 114
115 Iterator &operator--()
116 {
117 m_CurrentValue.prev();
118 return *this;
119 }
120
108 121 pointer operator->() const { return &m_CurrentValue; }
109 122 reference operator*() const { return m_CurrentValue; }
110 123
@@ -191,7 +191,7 public:
191 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 196 if (min > max) {
197 197 std::swap(min, max);
@@ -2,6 +2,7
2 2 #define SCIQLOP_IDATASERIES_H
3 3
4 4 #include <Common/MetaTypes.h>
5 #include <Data/DataSeriesIterator.h>
5 6 #include <Data/SqpRange.h>
6 7
7 8 #include <memory>
@@ -62,6 +63,20 public:
62 63 virtual std::unique_ptr<IDataSeries> clone() const = 0;
63 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 80 virtual void lockRead() = 0;
66 81 virtual void lockWrite() = 0;
67 82 virtual void unlock() = 0;
General Comments 0
You need to be logged in to leave comments. Login now