Platform::Collections::InputIterator Class
Provides a Standard Template Library InputIterator for collections derived from the Windows Runtime.
Syntax
template <typename X>
class InputIterator;
Parameters
X
The typename of the InputIterator template class.
Members
Public Typedefs
Name | Description |
---|---|
difference_type |
A pointer difference (ptrdiff_t). |
iterator_category |
The category of an input iterator (::std::input_iterator_tag). |
pointer |
A pointer to a const X |
reference |
A reference to a const X |
value_type |
The X typename. |
Public Constructors
Name | Description |
---|---|
InputIterator::InputIterator | Initializes a new instance of the InputIterator class. |
Public Operators
Name | Description |
---|---|
InputIterator::operator!= Operator | Indicates whether the current InputIterator is not equal to a specified InputIterator. |
InputIterator::operator* Operator | Retrieves a reference to the element specified by the current InputIterator. |
InputIterator::operator++ Operator | Increments the current InputIterator. |
InputIterator::operator== Operator | Indicates whether the current InputIterator is equal to a specified InputIterator. |
InputIterator::operator-> Operator | Retrieves the address of the element referenced by the current InputIterator. |
Inheritance Hierarchy
InputIterator
Requirements
Header: collection.h
Namespace: Platform::Collections
InputIterator::InputIterator Constructor
Initializes a new instance of the InputIterator class.
Syntax
InputIterator();
explicit InputIterator(Windows::Foundation::Collections<X>^ iterator);
Parameters
iterator
An iterator object.
InputIterator::operator->
Operator
Retrieves the address of the element specified by the current InputIterator.
Syntax
pointer operator->() const;
Return Value
The address of the element specified by the current InputIterator.
InputIterator::operator* Operator
Retrieves a reference to the element specified by the current InputIterator.
Syntax
reference operator*() const;
Return Value
The element specified by the current InputIterator.
InputIterator::operator== Operator
Indicates whether the current InputIterator is equal to a specified InputIterator.
Syntax
bool operator== (const InputIterator& other) const;
Parameters
other
Another InputIterator.
Return Value
true
if the current InputIterator is equal to other; otherwise, false
.
InputIterator::operator++ Operator
Increments the current InputIterator.
Syntax
InputIterator& operator++();
InputIterator operator++(int);
Return Value
The first syntax increments and then returns the current InputIterator. The second syntax returns a copy of the current InputIterator and then increments the current InputIterator.
Remarks
The first InputIterator syntax pre-increments the current InputIterator.
The second syntax post-increments the current InputIterator. The int
type in the second syntax indicates a post-increment operation, not an actual integer operand.
InputIterator::operator!= Operator
Indicates whether the current InputIterator is not equal to a specified InputIterator.
Syntax
bool operator!=(const InputIterator& other) const;
Parameters
other
Another InputIterator.
Return Value
true
if the current InputIterator is not equal to other; otherwise, false
.