LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 534 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 541 of file AssociatedData.h.

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

Definition at line 543 of file AssociatedData.h.

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

Type of collection being wrapped.

Definition at line 300 of file CollectionView.h.

Definition at line 308 of file CollectionView.h.

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

Definition at line 306 of file CollectionView.h.

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

Definition at line 304 of file CollectionView.h.

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

Definition at line 310 of file CollectionView.h.

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

Definition at line 311 of file CollectionView.h.

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

Definition at line 540 of file AssociatedData.h.

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

Definition at line 312 of file CollectionView.h.

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

Definition at line 302 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 546 of file AssociatedData.h.

References proxy::details::makeBoundaryListRange().

547  : base_t(rangebase_t(iBegin))
548  {}
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 372 of file CollectionView.h.

References util::flags::to_string().

373  {
374  if (i >= size()) {
375  throw std::out_of_range(
376  "CollectionView index out of range: "
377  + std::to_string(i) + " >= " + std::to_string(size())
378  );
379  }
380  return operator[](i);
381  }
size_type size() const noexcept
Returns the size of the collection.
std::string to_string(Flag_t< Storage > const flag)
Convert a flag into a stream (shows its index).
Definition: BitMask.h:187
auto operator[](size_type i) const -> decltype(auto)
Returns the content of the i-th element.
auto lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::back ( void  ) const-> decltype(auto)
inlineinherited

Returns the last element in the collection.

Definition at line 360 of file CollectionView.h.

360 { 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 332 of file CollectionView.h.

332 { 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 324 of file CollectionView.h.

325  { using std::cbegin; return cbegin(asRange()); }
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.
end_iter_t lar::CollectionView< BoundaryListRangeBase< BoundaryIter > >::cend ( ) const
inlinenoexceptinherited

Returns an iterator past the end of the collection.

Definition at line 328 of file CollectionView.h.

329  { using std::cend; return cend(asRange()); }
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 352 of file CollectionView.h.

353  { 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 356 of file CollectionView.h.

357  { 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 ( void  ) const
inlinenoexceptinherited

Returns whether the collection is empty.

Definition at line 318 of file CollectionView.h.

318 { 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 335 of file CollectionView.h.

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

Returns the first element in the collection.

Definition at line 338 of file CollectionView.h.

338 { 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 368 of file CollectionView.h.

369  { 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 346 of file CollectionView.h.

346 { 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 349 of file CollectionView.h.

349 { 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 321 of file CollectionView.h.

321 { 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: