LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
proxy::details::BoundaryListRange< BoundaryIter > Class Template Reference

A BoundaryListRangeBase with a full container interface. More...

#include "AssociatedData.h"

Inheritance diagram for proxy::details::BoundaryListRange< BoundaryIter >:
lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >

Public Types

using boundary_iterator_t = BoundaryIter
 
using collection_type = range_t
 Type of collection being wrapped. More...
 
using value_type = typename iter_traits_t::value_type
 
using const_reference = typename iter_traits_t::reference
 
using const_pointer = typename iter_traits_t::pointer
 
using const_iterator = begin_iter_t
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using difference_type = typename iter_traits_t::difference_type
 
using size_type = std::size_t
 

Public Member Functions

 BoundaryListRange (boundary_iterator_t const &iBegin)
 Constructor: from an iterator to the begin iterator. More...
 
Forward access.
bool empty () const noexcept
 Returns whether the collection is empty. More...
 
size_type size () const noexcept
 Returns the size of the collection. More...
 
const_iterator cbegin () const noexcept
 Returns an iterator to the begin of the collection. More...
 
end_iter_t cend () const noexcept
 Returns an iterator past the end of the collection. More...
 
const_iterator begin () const noexcept
 Returns an iterator to the begin of the collection. More...
 
end_iter_t end () const noexcept
 Returns an iterator past the end of the collection. More...
 
auto front () const -> decltype(auto)
 Returns the first element in the collection. More...
 
Backward access.
const_reverse_iterator rbegin () const noexcept
 Returns a reverse iterator to the begin of the collection. More...
 
const_reverse_iterator rend () const noexcept
 Returns a reverse iterator past the end of the collection. More...
 
const_reverse_iterator crbegin () const noexcept
 Returns a reverse iterator to the begin of the collection. More...
 
const_reverse_iterator crend () const noexcept
 Returns a reverse iterator past the end of the collection. More...
 
auto back () const -> decltype(auto)
 Returns the last element in the collection. More...
 
Random access.
auto operator[] (size_type i) const -> decltype(auto)
 Returns the content of the i-th element. More...
 
auto at (size_type i) const -> decltype(auto)
 Returns the content of the i-th element. More...
 
Contiguous access.
const_pointer data () const
 

Private Types

using rangebase_t = BoundaryListRangeBase< BoundaryIter >
 
using base_t = lar::CollectionView< rangebase_t >
 

Detailed Description

template<typename BoundaryIter>
class proxy::details::BoundaryListRange< BoundaryIter >

A BoundaryListRangeBase with a full container interface.

Definition at line 519 of file AssociatedData.h.

Member Typedef Documentation

template<typename BoundaryIter >
using proxy::details::BoundaryListRange< BoundaryIter >::base_t = lar::CollectionView<rangebase_t>
private

Definition at line 524 of file AssociatedData.h.

template<typename BoundaryIter >
using proxy::details::BoundaryListRange< BoundaryIter >::boundary_iterator_t = BoundaryIter

Definition at line 527 of file AssociatedData.h.

using lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::collection_type = range_t
inherited

Type of collection being wrapped.

Definition at line 299 of file CollectionView.h.

Definition at line 307 of file CollectionView.h.

using lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::const_pointer = typename iter_traits_t::pointer
inherited

Definition at line 305 of file CollectionView.h.

using lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::const_reference = typename iter_traits_t::reference
inherited

Definition at line 303 of file CollectionView.h.

using lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::const_reverse_iterator = std::reverse_iterator<const_iterator>
inherited

Definition at line 309 of file CollectionView.h.

using lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::difference_type = typename iter_traits_t::difference_type
inherited

Definition at line 310 of file CollectionView.h.

template<typename BoundaryIter >
using proxy::details::BoundaryListRange< BoundaryIter >::rangebase_t = BoundaryListRangeBase<BoundaryIter>
private

Definition at line 523 of file AssociatedData.h.

using lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::size_type = std::size_t
inherited

Definition at line 311 of file CollectionView.h.

using lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::value_type = typename iter_traits_t::value_type
inherited

Definition at line 301 of file CollectionView.h.

Constructor & Destructor Documentation

template<typename BoundaryIter >
proxy::details::BoundaryListRange< BoundaryIter >::BoundaryListRange ( boundary_iterator_t const &  iBegin)
inline

Constructor: from an iterator to the begin iterator.

Definition at line 530 of file AssociatedData.h.

530 : base_t(rangebase_t(iBegin)) {}
BoundaryListRangeBase< BoundaryIter > rangebase_t
lar::CollectionView< rangebase_t > base_t

Member Function Documentation

auto lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::at ( size_type  i) const-> decltype(auto)
inlineinherited

Returns the content of the i-th element.

Definition at line 374 of file CollectionView.h.

References util::size(), and util::to_string().

375  {
376  if (i >= size()) {
377  throw std::out_of_range("CollectionView index out of range: " + std::to_string(i) +
378  " >= " + std::to_string(size()));
379  }
380  return operator[](i);
381  }
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
size_type size() const noexcept
Returns the size of the collection.
auto operator[](size_type i) const -> decltype(auto)
Returns the content of the i-th element.
auto lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::back ( ) const-> decltype(auto)
inlineinherited

Returns the last element in the collection.

Definition at line 363 of file CollectionView.h.

363 { return *crbegin(); }
const_reverse_iterator crbegin() const noexcept
Returns a reverse iterator to the begin of the collection.
const_iterator lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::begin ( ) const
inlinenoexceptinherited

Returns an iterator to the begin of the collection.

Definition at line 337 of file CollectionView.h.

References util::cbegin().

337 { return cbegin(); }
const_iterator cbegin() const noexcept
Returns an iterator to the begin of the collection.
const_iterator lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::cbegin ( ) const
inlinenoexceptinherited

Returns an iterator to the begin of the collection.

Definition at line 323 of file CollectionView.h.

References util::cbegin().

324  {
325  using std::cbegin;
326  return cbegin(asRange());
327  }
const_iterator cbegin() const noexcept
Returns an iterator to the begin of the collection.
range_t const & asRange() const
Returns this very object, cast back to range_t.
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:85
end_iter_t lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::cend ( ) const
inlinenoexceptinherited

Returns an iterator past the end of the collection.

Definition at line 330 of file CollectionView.h.

References util::cend().

331  {
332  using std::cend;
333  return cend(asRange());
334  }
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:93
end_iter_t cend() const noexcept
Returns an iterator past the end of the collection.
range_t const & asRange() const
Returns this very object, cast back to range_t.
const_reverse_iterator lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::crbegin ( ) const
inlinenoexceptinherited

Returns a reverse iterator to the begin of the collection.

Definition at line 357 of file CollectionView.h.

References util::cend().

357 { return const_reverse_iterator(cend()); }
end_iter_t cend() const noexcept
Returns an iterator past the end of the collection.
std::reverse_iterator< const_iterator > const_reverse_iterator
const_reverse_iterator lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::crend ( ) const
inlinenoexceptinherited

Returns a reverse iterator past the end of the collection.

Definition at line 360 of file CollectionView.h.

References util::cbegin().

360 { return const_reverse_iterator(cbegin()); }
const_iterator cbegin() const noexcept
Returns an iterator to the begin of the collection.
std::reverse_iterator< const_iterator > const_reverse_iterator
const_pointer lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::data ( ) const
inlineinherited

Definition at line 388 of file CollectionView.h.

388 { return &front(); }
auto front() const -> decltype(auto)
Returns the first element in the collection.
bool lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::empty ( ) const
inlinenoexceptinherited

Returns whether the collection is empty.

Definition at line 317 of file CollectionView.h.

References util::cbegin(), and util::cend().

317 { return cbegin() == cend(); }
end_iter_t cend() const noexcept
Returns an iterator past the end of the collection.
const_iterator cbegin() const noexcept
Returns an iterator to the begin of the collection.
end_iter_t lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::end ( void  ) const
inlinenoexceptinherited

Returns an iterator past the end of the collection.

Definition at line 340 of file CollectionView.h.

References util::cend().

340 { return cend(); }
end_iter_t cend() const noexcept
Returns an iterator past the end of the collection.
auto lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::front ( ) const-> decltype(auto)
inlineinherited

Returns the first element in the collection.

Definition at line 343 of file CollectionView.h.

References util::cbegin().

343 { return *cbegin(); }
const_iterator cbegin() const noexcept
Returns an iterator to the begin of the collection.
auto lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::operator[] ( size_type  i) const-> decltype(auto)
inlineinherited

Returns the content of the i-th element.

Definition at line 371 of file CollectionView.h.

References util::cbegin().

371 { return cbegin()[i]; }
const_iterator cbegin() const noexcept
Returns an iterator to the begin of the collection.
const_reverse_iterator lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::rbegin ( ) const
inlinenoexceptinherited

Returns a reverse iterator to the begin of the collection.

Definition at line 351 of file CollectionView.h.

351 { return crbegin(); }
const_reverse_iterator crbegin() const noexcept
Returns a reverse iterator to the begin of the collection.
const_reverse_iterator lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::rend ( ) const
inlinenoexceptinherited

Returns a reverse iterator past the end of the collection.

Definition at line 354 of file CollectionView.h.

354 { return crend(); }
const_reverse_iterator crend() const noexcept
Returns a reverse iterator past the end of the collection.
size_type lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::size ( void  ) const
inlinenoexceptinherited

Returns the size of the collection.

Definition at line 320 of file CollectionView.h.

References util::cbegin(), and util::cend().

320 { return std::distance(cbegin(), cend()); }
end_iter_t cend() const noexcept
Returns an iterator past the end of the collection.
const_iterator cbegin() const noexcept
Returns an iterator to the begin of the collection.

The documentation for this class was generated from the following file: