LLVM 20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT > Class Template Reference

A utility class used to implement an iterator that contains some base object and an index. More...

#include "llvm/ADT/STLExtras.h"

Inheritance diagram for llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >:
Inheritance graph
[legend]

Public Member Functions

ptrdiff_t operator- (const indexed_accessor_iterator &rhs) const
 
bool operator== (const indexed_accessor_iterator &rhs) const
 
bool operator< (const indexed_accessor_iterator &rhs) const
 
DerivedT & operator+= (ptrdiff_t offset)
 
DerivedT & operator-= (ptrdiff_t offset)
 
ptrdiff_t getIndex () const
 Returns the current index of the iterator.
 
const BaseT & getBase () const
 Returns the current base of the iterator.
 
- Public Member Functions inherited from llvm::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
 

Protected Member Functions

 indexed_accessor_iterator (BaseT base, ptrdiff_t index)
 

Protected Attributes

BaseT base
 
ptrdiff_t index
 

Additional Inherited Members

- Public Types inherited from llvm::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 llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
enum  { IsRandomAccess , IsBidirectional }
 

Detailed Description

template<typename DerivedT, typename BaseT, typename T, typename PointerT = T *, typename ReferenceT = T &>
class llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >

A utility class used to implement an iterator that contains some base object and an index.

The iterator moves the index but keeps the base constant.

Definition at line 1203 of file STLExtras.h.

Constructor & Destructor Documentation

◆ indexed_accessor_iterator()

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::indexed_accessor_iterator ( BaseT  base,
ptrdiff_t  index 
)
inlineprotected

Definition at line 1237 of file STLExtras.h.

Member Function Documentation

◆ getBase()

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
const BaseT & llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::getBase ( ) const
inline

Returns the current base of the iterator.

Definition at line 1234 of file STLExtras.h.

References llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::base.

◆ getIndex()

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
ptrdiff_t llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::getIndex ( ) const
inline

Returns the current index of the iterator.

Definition at line 1231 of file STLExtras.h.

References llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::index.

◆ operator+=()

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
DerivedT & llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::operator+= ( ptrdiff_t  offset)
inline

◆ operator-()

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
ptrdiff_t llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::operator- ( const indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT > &  rhs) const
inline

◆ operator-=()

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
DerivedT & llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::operator-= ( ptrdiff_t  offset)
inline

◆ operator<()

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
bool llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::operator< ( const indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT > &  rhs) const
inline

◆ operator==()

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
bool llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::operator== ( const indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT > &  rhs) const
inline

Member Data Documentation

◆ base

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
BaseT llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::base
protected

◆ index

template<typename DerivedT , typename BaseT , typename T , typename PointerT = T *, typename ReferenceT = T &>
ptrdiff_t llvm::indexed_accessor_iterator< DerivedT, BaseT, T, PointerT, ReferenceT >::index
protected

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