title | description | ms.date | ms.topic | f1_keywords | helpviewer_keywords | ||
---|---|---|---|---|---|---|---|
Platform::Collections::VectorIterator class | Learn more about: Platform::Collections::VectorIterator Class | 03/27/2019 | reference |
|
|
Provides a Standard Template Library iterator for objects derived from the Windows Runtime IVector
interface.
VectorIterator
is a proxy iterator that stores elements of type VectorProxy<T>
. However, the proxy object is almost never visible to user code. For more information, see Collections (C++/CX).
template <typename T> classVectorIterator;
T
The typename of the VectorIterator
template class.
Name | Description |
---|---|
difference_type | A pointer difference (ptrdiff_t ). |
iterator_category | The category of a random access iterator (::std::random_access_iterator_tag ). |
pointer | A pointer to an internal type, Platform::Collections::Details::VectorProxy<T> , that is required for the implementation of VectorIterator . |
reference | A reference to an internal type, Platform::Collections::Details::VectorProxy<T> , that is required for the implementation of VectorIterator . |
value_type | The T typename. |
Name | Description |
---|---|
VectorIterator::VectorIterator | Initializes a new instance of the VectorIterator class. |
Name | Description |
---|---|
VectorIterator::operator- Operator | Subtracts either a specified number of elements from the current iterator yielding a new iterator, or a specified iterator from the current iterator yielding the number of elements between the iterators. |
VectorIterator::operator-- Operator | Decrements the current VectorIterator. |
VectorIterator::operator!= Operator | Indicates whether the current VectorIterator is not equal to a specified VectorIterator. |
VectorIterator::operator* Operator | Retrieves a reference to the element specified by the current VectorIterator. |
VectorIterator::operator[] | Retrieves a reference to the element that is a specified displacement from the current VectorIterator. |
VectorIterator::operator+ Operator | Returns a VectorIterator that references the element at the specified displacement from the specified VectorIterator. |
VectorIterator::operator++ Operator | Increments the current VectorIterator. |
VectorIterator::operator+= Operator | Increments the current VectorIterator by the specified displacement. |
VectorIterator::operator< Operator | Indicates whether the current VectorIterator is less than a specified VectorIterator. |
VectorIterator::operator<= Operator | Indicates whether the current VectorIterator is less than or equal to a specified VectorIterator. |
VectorIterator::operator-= Operator | Decrements the current VectorIterator by the specified displacement. |
VectorIterator::operator== Operator | Indicates whether the current VectorIterator is equal to a specified VectorIterator. |
VectorIterator::operator> Operator | Indicates whether the current VectorIterator is greater than a specified VectorIterator. |
VectorIterator::operator-> Operator | Retrieves the address of the element referenced by the current VectorIterator. |
VectorIterator::operator>= Operator | Indicates whether the current VectorIterator is greater than or equal to a specified VectorIterator. |
VectorIterator
Header:collection.h
Namespace:Platform::Collections
Retrieves the address of the element referenced by the current VectorIterator.
Detail::ArrowProxy<T> operator->() const;
The value of the element that is referenced by the current VectorIterator
.
The type of the return value is an unspecified internal type that is required for the implementation of this operator.
Decrements the current VectorIterator.
VectorIterator& operator--(); VectorIterator operator--(int);
The first syntax decrements and then returns the current VectorIterator
. The second syntax returns a copy of the current VectorIterator
and then decrements the current VectorIterator
.
The first VectorIterator syntax pre-decrements the current VectorIterator
.
The second syntax post-decrements the current VectorIterator. The int
type in the second syntax indicates a post-decrement operation, not an actual integer operand.
Retrieves the address of the element specified by the current VectorIterator
.
reference operator*() const;
The element specified by the current VectorIterator
.
Indicates whether the current VectorIterator
is equal to a specified VectorIterator
.
booloperator==(const VectorIterator& other) const;
other
Another VectorIterator
.
true
if the current VectorIterator is equal to other; otherwise, false
.
Indicates whether the current VectorIterator
is greater than a specified VectorIterator
.
booloperator>(const VectorIterator& other) const
other
Another VectorIterator
.
true
if the current VectorIterator is greater than other
; otherwise, false
.
Indicates whether the current VectorIterator is greater than or equal to the specified VectorIterator
.
booloperator>=(const VectorIterator& other) const
other
Another VectorIterator
.
true
if the current VectorIterator
is greater than or equal to other
; otherwise, false
.
Increments the current VectorIterator
.
VectorIterator& operator++(); VectorIterator operator++(int);
The first syntax increments and then returns the current VectorIterator
. The second syntax returns a copy of the current VectorIterator
and then increments the current VectorIterator
.
The first VectorIterator
syntax pre-increments the current VectorIterator
.
The second syntax post-increments the current VectorIterator
. The int
type in the second syntax indicates a post-increment operation, not an actual integer operand.
Indicates whether the current VectorIterator
is not equal to a specified VectorIterator
.
booloperator!=(const VectorIterator& other) const;
other
Another VectorIterator
.
true
if the current VectorIterator
is not equal to other; otherwise, false
.
Indicates whether the current VectorIterator
is less than a specified VectorIterator
.
booloperator<(const VectorIterator& other) const
other
Another VectorIterator
.
true
if the current VectorIterator
is less than other
; otherwise, false
.
Indicates whether the current VectorIterator
is less than or equal to a specified VectorIterator
.
booloperator<=(const VectorIterator& other) const
other
Another VectorIterator
.
true
if the current VectorIterator
is less than or equal to other
; otherwise, false
.
Subtracts either a specified number of elements from the current iterator yielding a new iterator, or a specified iterator from the current iterator yielding the number of elements between the iterators.
VectorIterator operator-(difference_type n) const; difference_type operator-(const VectorIterator& other) const;
n
A number of elements.
other
Another VectorIterator
.
The first operator syntax returns a VectorIterator
object that is n
elements less than the current VectorIterator
. The second operator syntax returns the number of elements between the current and the other
VectorIterator
.
Increments the current VectorIterator
by the specified displacement.
VectorIterator& operator+=(difference_type n);
n
A integer displacement.
The updated VectorIterator
.
Returns a VectorIterator
that references the element at the specified displacement from the specified VectorIterator
.
VectorIterator operator+(difference_type n); template <typename T> inline VectorIterator<T> operator+( ptrdiff_t n, const VectorIterator<T>& i);
T
In the second syntax, the typename of the VectorIterator
.
n
An integer displacement.
i
In the second syntax, a VectorIterator
.
In the first syntax, a VectorIterator
that references the element at the specified displacement from the current VectorIterator
.
In the second syntax, a VectorIterator
that references the element at the specified displacement from the beginning of parameter i
.
The first syntax example
Decrements the current VectorIterator
by the specified displacement.
VectorIterator& operator-=(difference_type n);
n
An integer displacement.
The updated VectorIterator
.
Retrieves a reference to the element that is a specified displacement from the current VectorIterator
.
reference operator[](difference_type n) const;
n
An integer displacement.
The element that is displaced by n
elements from the current VectorIterator
.
Initializes a new instance of the VectorIterator
class.
VectorIterator(); explicitVectorIterator( Windows::Foundation::Collections::IVector<T>^ v);
v
An IVector<T>
object.
The first syntax example is the default constructor. The second syntax example is an explicit constructor that is used to construct a VectorIterator
from an IVector<T>
object.