|
BDE 4.39.x Production Release
|
#include <bslstl_randomaccessiterator.h>
Given an ITER_IMP type that implements a minimal subset of an iterator interface, this template generates a complete iterator that meets all of the requirements of a "random-access iterator" in the C++ standard. If T is const-qualified, then the resulting type is a const iterator. T shall not be a function, reference type or void. ITER_IMP must provide public operations so that, for objects i and j of type ITER_IMP and n of an integral type, the following operations are supported:
Public Types | |
| typedef UnCvqT | value_type |
| typedef std::ptrdiff_t | difference_type |
| typedef T * | pointer |
| typedef T & | reference |
| typedef std::random_access_iterator_tag | iterator_category |
Public Types inherited from bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE > | |
| typedef UnCvqT | value_type |
| typedef std::ptrdiff_t | difference_type |
| typedef T * | pointer |
| typedef T & | reference |
| typedef std::bidirectional_iterator_tag | iterator_category |
Public Types inherited from bslstl::ForwardIterator< T, ITER_IMP, TAG_TYPE > | |
| typedef UnCvqT | value_type |
| typedef std::ptrdiff_t | difference_type |
| typedef T * | pointer |
| typedef T & | reference |
| typedef std::forward_iterator_tag | iterator_category |
| typedef std::ptrdiff_t bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >::difference_type |
| typedef std::random_access_iterator_tag bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >::iterator_category |
| typedef T* bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >::pointer |
| typedef T& bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >::reference |
| typedef UnCvqT bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >::value_type |
|
inline |
Construct the default value for this iterator type. All default- constructed RandomAccessIterator objects represent non-dereferenceable iterators into the same empty range. They do not have a singular value unless an object of the type specified by the template parameter ITER_IMP has a singular value after value-initialization.
|
inline |
Construct a random access iterator having the specified implementation of the parameterized ITER_IMP type.
|
inline |
Construct a random access iterator from another (compatible) RandomAccessIterator type, e.g., a mutable iterator of the same type.
| bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >::~RandomAccessIterator | ( | ) |
|
inline |
Increment to the next element. Return a reference to this modifiable iterator.
|
inline |
Increment by the specified offset number of elements. Return a reference to this modifiable iterator.
offset, is within the bounds of the underlying sequence.
|
inline |
Decrement to the previous element. Return a reference to this modifiable iterator.
|
inline |
Decrement by the specified offset number of elements. Return a reference to this modifiable iterator.
offset, is within the bounds of the underlying sequence.
|
inline |
Copy the value of the specified rhs to this iterator. Return a reference to this modifiable iterator.
|
inline |
Return a reference to the element at the specified index positions past the current one.
index may be negative.