1 #ifndef canvas_Persistency_Common_AssnsIter_h 2 #define canvas_Persistency_Common_AssnsIter_h 13 template <
class L,
class R,
class D>
26 template <Direction Dir>
30 return static_cast<std::underlying_type_t<Direction>
>(Dir);
35 template <
class L,
class R,
class D, Direction Dir = Direction::Forward>
46 : coll_{&assns}, index_{assns.
size()}
50 : coll_{&assns}, index_{i}
71 bool operator<(art::const_AssnsIter<L, R, D, Dir>
const& iter)
const;
72 bool operator<=(art::const_AssnsIter<L, R, D, Dir>
const& iter)
const;
84 std::size_t index_{-1ull};
93 template <Direction Dir>
102 template <
class L,
class R,
class D, Direction Dir>
103 constexpr
auto const&
110 template <
class L,
class R,
class D, Direction Dir>
111 constexpr
auto const&
119 template <
class L,
class R,
class D, Direction Dir>
123 auto const index = index_for_dereferencing<Dir>(index_);
124 node_.first = (*coll_)[index].first;
125 node_.second = (*coll_)[index].second;
126 node_.data = &(coll_->data(index));
131 template <
class L,
class R,
class D, Direction Dir>
135 auto const index = index_for_dereferencing<Dir>(index_);
136 node_.first = (*coll_)[index].first;
137 node_.second = (*coll_)[index].second;
138 node_.data = &(coll_->data(index));
143 template <
class L,
class R,
class D, Direction Dir>
147 index_ = index_ + signed_one<Dir>();
152 template <
class L,
class R,
class D, Direction Dir>
157 index_ = index_ + signed_one<Dir>();
162 template <
class L,
class R,
class D, Direction Dir>
166 index_ = index_ - signed_one<Dir>();
170 template <
class L,
class R,
class D, Direction Dir>
175 index_ = index_ - signed_one<Dir>();
180 template <
class L,
class R,
class D, Direction Dir>
185 return index_ == iter.
index_;
189 template <
class L,
class R,
class D, Direction Dir>
194 return !(index_ == iter.
index_);
198 template <
class L,
class R,
class D, Direction Dir>
204 index_ = index_ + signed_one<Dir>() * i;
209 template <
class L,
class R,
class D, Direction Dir>
214 tmp.index_ =
tmp.index_ + signed_one<Dir>() * i;
219 template <
class L,
class R,
class D, Direction Dir>
225 index_ = index_ - signed_one<Dir>() * i;
230 template <
class L,
class R,
class D, Direction Dir>
235 tmp.index_ =
tmp.index_ - signed_one<Dir>() * i;
240 template <
class L,
class R,
class D, Direction Dir>
245 return (iter1.
index_ - index_);
249 template <
class L,
class R,
class D, Direction Dir>
254 tmp.index_ =
tmp.index_ + signed_one<Dir>() * i;
259 template <
class L,
class R,
class D, Direction Dir>
264 auto const& l =
left(*
this, iter);
265 auto const& r =
right(*
this, iter);
266 return l.index_ < r.index_;
270 template <
class L,
class R,
class D, Direction Dir>
275 auto const& l =
left(*
this, iter);
276 auto const& r =
right(*
this, iter);
277 return l.index_ <= r.index_;
281 template <
class L,
class R,
class D, Direction Dir>
286 auto const& l =
left(*
this, iter);
287 auto const& r =
right(*
this, iter);
288 return l.index_ > r.index_;
292 template <
class L,
class R,
class D, Direction Dir>
297 auto const& l =
left(*
this, iter);
298 auto const& r =
right(*
this, iter);
299 return l.index_ >= r.index_;
302 template <
class L,
class R,
class D, Direction Dir>
reference operator*() const
const_AssnsIter< L, R, D, Dir > & operator+=(std::size_t i)
value_type const & reference
pointer operator->() const
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
std::size_t getIndex() const
bool operator>=(art::const_AssnsIter< L, R, D, Dir > const &iter) const
std::random_access_iterator_tag iterator_category
bool operator>(art::const_AssnsIter< L, R, D, Dir > const &iter) const
bool operator>=(ScheduleID left, ScheduleID right)
value_type const * pointer
const_AssnsIter(art::Assns< L, R, D > const &assns)
bool operator<(art::const_AssnsIter< L, R, D, Dir > const &iter) const
AssnsNode(art::Ptr< L > const &l, art::Ptr< R > const &r, D const &d)
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
const_AssnsIter(art::Assns< L, R, D > const &assns, std::size_t const i)
bool operator>(ScheduleID left, ScheduleID right)
const_AssnsIter< L, R, D, Dir > & operator--()
bool operator<=(art::const_AssnsIter< L, R, D, Dir > const &iter) const
QuadExpr operator-(double v, const QuadExpr &e)
const_AssnsIter< L, R, D, Dir > operator+(std::size_t i) const
String & operator+=(String &s, VectorDumper< Vector > const &manip)
Appends a string rendering of a vector to the specified string.
const_AssnsIter< L, R, D, Dir > & operator++()
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
constexpr int signed_one()
QuadExpr operator+(double v, const QuadExpr &e)
constexpr auto index_for_dereferencing(std::size_t const i)
value_type operator[](std::size_t i) const
std::ptrdiff_t difference_type
bool operator==(art::const_AssnsIter< L, R, D, Dir > const &iter) const
const_AssnsIter< L, R, D, Dir > operator-(std::size_t i) const
AssnsNode< L, R, D > node_
const_AssnsIter< L, R, D, Dir > & operator-=(std::size_t i)
bool operator==(Provenance const &a, Provenance const &b)
const_AssnsIter< L, R, D, Dir > & operator=(art::const_AssnsIter< L, R, D, Dir > const &iter)
QuadExpr operator*(double v, const QuadExpr &e)
bool operator!=(art::const_AssnsIter< L, R, D, Dir > const &iter) const