WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::util::pointee_iterator< WrappedIteratorT, T > Struct Template Reference

An iterator type that allows iterating over the pointees via some other iterator. More...

#include <wpi/util/iterator.hpp>

Inheritance diagram for wpi::util::pointee_iterator< WrappedIteratorT, T >:
wpi::util::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT > wpi::util::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >

Public Member Functions

 pointee_iterator ()=default
template<typename U>
 pointee_iterator (U &&u)
T & operator* () const
Public Member Functions inherited from wpi::util::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
DerivedT & operator+= (difference_type n)
DerivedT & operator-= (difference_type n)
difference_type operator- (const DerivedT &RHS) const
DerivedT & operator++ ()
DerivedT & operator-- ()
ReferenceT operator* () const
Public Member Functions inherited from wpi::util::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
DerivedT operator+ (DifferenceTypeT n) const
DerivedT operator- (DifferenceTypeT n) const
DerivedT & operator++ ()
DerivedT operator++ (int)
DerivedT & operator-- ()
DerivedT operator-- (int)
bool operator!= (const DerivedT &RHS) const
bool operator> (const DerivedT &RHS) const
bool operator<= (const DerivedT &RHS) const
bool operator>= (const DerivedT &RHS) const
PointerProxy operator-> () const
ReferenceProxy operator[] (DifferenceTypeT n) const

Additional Inherited Members

Public Types inherited from wpi::util::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
using difference_type = DifferenceTypeT
Public Types inherited from wpi::util::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
using iterator_category = IteratorCategoryT
using value_type = T
using difference_type = DifferenceTypeT
using pointer = PointerT
using reference = ReferenceT
Protected Types inherited from wpi::util::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
enum  { IsRandomAccess , IsBidirectional }
Protected Member Functions inherited from wpi::util::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
 iterator_adaptor_base ()=default
 iterator_adaptor_base (WrappedIteratorT u)
const WrappedIteratorT & wrapped () const
Protected Attributes inherited from wpi::util::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
WrappedIteratorT I

Detailed Description

template<typename WrappedIteratorT, typename T = std::remove_reference_t<decltype( **std::declval<WrappedIteratorT>())>>
struct wpi::util::pointee_iterator< WrappedIteratorT, T >

An iterator type that allows iterating over the pointees via some other iterator.

The typical usage of this is to expose a type that iterates over Ts, but which is implemented with some iterator over T*s:

Constructor & Destructor Documentation

◆ pointee_iterator() [1/2]

template<typename WrappedIteratorT, typename T = std::remove_reference_t<decltype( **std::declval<WrappedIteratorT>())>>
wpi::util::pointee_iterator< WrappedIteratorT, T >::pointee_iterator ( )
default

◆ pointee_iterator() [2/2]

template<typename WrappedIteratorT, typename T = std::remove_reference_t<decltype( **std::declval<WrappedIteratorT>())>>
template<typename U>
wpi::util::pointee_iterator< WrappedIteratorT, T >::pointee_iterator ( U && u)
inline

Member Function Documentation

◆ operator*()

template<typename WrappedIteratorT, typename T = std::remove_reference_t<decltype( **std::declval<WrappedIteratorT>())>>
T & wpi::util::pointee_iterator< WrappedIteratorT, T >::operator* ( ) const
inline

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