1 #ifndef canvas_Persistency_Common_AssnsIter_h 2 #define canvas_Persistency_Common_AssnsIter_h 15 template <Direction Dir>
19 return static_cast<std::underlying_type_t<Direction>
>(Dir);
38 : coll_{&assns}, index_{assns.
size()}
42 : coll_{&assns}, index_{i}
61 bool operator<(art::const_AssnsIter<L, R, D, Dir>
const& iter)
const;
62 bool operator<=(art::const_AssnsIter<L, R, D, Dir>
const& iter)
const;
74 std::size_t index_{-1ull};
83 template <Direction Dir>
92 template <
typename L,
typename R,
typename D, Direction Dir>
100 template <
typename L,
typename R,
typename D, Direction Dir>
101 constexpr
auto const&
109 template <
typename L,
typename R,
typename D, Direction Dir>
113 auto const index = index_for_dereferencing<Dir>(index_);
114 node_.first = (*coll_)[
index].first;
115 node_.second = (*coll_)[
index].second;
116 node_.data = &(coll_->data(
index));
121 template <
typename L,
typename R,
typename D, Direction Dir>
125 auto const index = index_for_dereferencing<Dir>(index_);
126 node_.first = (*coll_)[
index].first;
127 node_.second = (*coll_)[
index].second;
128 node_.data = &(coll_->data(
index));
133 template <
typename L,
typename R,
typename D, Direction Dir>
137 index_ = index_ + signed_one<Dir>();
142 template <
typename L,
typename R,
typename D, Direction Dir>
147 index_ = index_ + signed_one<Dir>();
152 template <
typename L,
typename R,
typename D, Direction Dir>
156 index_ = index_ - signed_one<Dir>();
160 template <
typename L,
typename R,
typename D, Direction Dir>
165 index_ = index_ - signed_one<Dir>();
170 template <
typename L,
typename R,
typename D, Direction Dir>
175 return index_ == iter.
index_;
179 template <
typename L,
typename R,
typename D, Direction Dir>
184 return !(index_ == iter.
index_);
188 template <
typename L,
typename R,
typename D, Direction Dir>
194 index_ = index_ + signed_one<Dir>() * i;
199 template <
typename L,
typename R,
typename D, Direction Dir>
204 tmp.index_ =
tmp.index_ + signed_one<Dir>() * i;
209 template <
typename L,
typename R,
typename D, Direction Dir>
215 index_ = index_ - signed_one<Dir>() * i;
220 template <
typename L,
typename R,
typename D, Direction Dir>
225 tmp.index_ =
tmp.index_ - signed_one<Dir>() * i;
230 template <
typename L,
typename R,
typename D, Direction Dir>
235 return (iter1.
index_ - index_);
239 template <
typename L,
typename R,
typename D, Direction Dir>
244 tmp.index_ =
tmp.index_ + signed_one<Dir>() * i;
249 template <
typename L,
typename R,
typename D, Direction Dir>
254 auto const&
l =
left(*
this, iter);
255 auto const&
r =
right(*
this, iter);
256 return l.index_ <
r.index_;
260 template <
typename L,
typename R,
typename D, Direction Dir>
265 auto const&
l =
left(*
this, iter);
266 auto const&
r =
right(*
this, iter);
267 return l.index_ <=
r.index_;
271 template <
typename L,
typename R,
typename D, Direction Dir>
276 auto const&
l =
left(*
this, iter);
277 auto const&
r =
right(*
this, iter);
278 return l.index_ >
r.index_;
282 template <
typename L,
typename R,
typename D, Direction Dir>
287 auto const&
l =
left(*
this, iter);
288 auto const&
r =
right(*
this, iter);
289 return l.index_ >=
r.index_;
reference operator*() const
const_AssnsIter< L, R, D, Dir > & operator+=(std::size_t i)
value_type const & reference
bool operator==(Provenance const &a, Provenance const &b) noexcept
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>(ScheduleID const left, ScheduleID const right) noexcept
bool operator>=(art::const_AssnsIter< L, R, D, Dir > const &iter) const
DoubleProduct & operator+=(DoubleProduct &left, DoubleProduct const &right)
std::random_access_iterator_tag iterator_category
bool operator>(art::const_AssnsIter< L, R, D, Dir > const &iter) const
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
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
const_AssnsIter(art::Assns< L, R, D > const &assns, std::size_t const i)
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
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)
DoubleProduct operator+(DoubleProduct const &left, DoubleProduct const right)
constexpr int signed_one()
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
const_AssnsIter< L, R, D, Dir > & operator-=(std::size_t i)
bool operator>=(ScheduleID const left, ScheduleID const right) noexcept
QuadExpr operator*(double v, const QuadExpr &e)
bool operator!=(art::const_AssnsIter< L, R, D, Dir > const &iter) const