|
LLVM 22.0.0git
|
This class provides an implementation of a range of indexed_accessor_iterators where the base is not indexable. More...
#include "llvm/ADT/STLExtras.h"
Public Member Functions | |
| indexed_accessor_range (BaseT base, ptrdiff_t startIndex, ptrdiff_t count) | |
| const BaseT & | getBase () const |
| Returns the current base of the range. | |
| ptrdiff_t | getStartIndex () const |
| Returns the current start index of the range. | |
| Public Member Functions inherited from llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & > | |
| indexed_accessor_range_base (iterator begin, iterator end) | |
| iterator | begin () const |
| iterator | end () const |
| T & | operator[] (size_t Index) const |
| T & | front () const |
| T & | back () const |
| size_t | size () const |
| Return the size of this range. | |
| bool | empty () const |
| Return if the range is empty. | |
| DerivedT | slice (size_t n, size_t m) const |
| Drop the first N elements, and keep M elements. | |
| DerivedT | drop_front (size_t n=1) const |
| Drop the first n elements. | |
| DerivedT | drop_back (size_t n=1) const |
| Drop the last n elements. | |
| DerivedT | take_front (size_t n=1) const |
| Take the first n elements. | |
| DerivedT | take_back (size_t n=1) const |
| Take the last n elements. | |
| operator RangeT () const | |
| Allow conversion to any type accepting an iterator_range. | |
| const BaseT & | getBase () const |
| Returns the base of this range. | |
Static Public Member Functions | |
| static std::pair< BaseT, ptrdiff_t > | offset_base (const std::pair< BaseT, ptrdiff_t > &base, ptrdiff_t index) |
| See detail::indexed_accessor_range_base for details. | |
| static ReferenceT | dereference_iterator (const std::pair< BaseT, ptrdiff_t > &base, ptrdiff_t index) |
| See detail::indexed_accessor_range_base for details. | |
Additional Inherited Members | |
| Public Types inherited from llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & > | |
| using | RangeBaseT |
| Protected Member Functions inherited from llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & > | |
| indexed_accessor_range_base & | operator= (const indexed_accessor_range_base &)=default |
| Protected Attributes inherited from llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & > | |
| BaseT | base |
| The base that owns the provided range of values. | |
| ptrdiff_t | count |
| The size from the owning range. | |
This class provides an implementation of a range of indexed_accessor_iterators where the base is not indexable.
Ranges with bases that are offsetable should derive from indexed_accessor_range_base instead. Derived range classes are expected to implement the following static method:
Definition at line 1349 of file STLExtras.h.
|
inline |
Definition at line 1353 of file STLExtras.h.
References llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::base, llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::count, llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::indexed_accessor_range_base(), and T.
|
inlinestatic |
See detail::indexed_accessor_range_base for details.
Definition at line 1376 of file STLExtras.h.
References llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::base.
|
inline |
Returns the current base of the range.
Definition at line 1362 of file STLExtras.h.
References llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::base.
|
inline |
Returns the current start index of the range.
Definition at line 1365 of file STLExtras.h.
References llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::base.
|
inlinestatic |
See detail::indexed_accessor_range_base for details.
Definition at line 1369 of file STLExtras.h.
References llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::base.