Aracılığıyla paylaş


IBindableIterator Interface

Definition

Supports bindable iteration over a collection.

public interface class IBindableIterator
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1780313095, 1901, 18930, 131, 20, 245, 44, 156, 154, 131, 49)]
struct IBindableIterator
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(1780313095, 1901, 18930, 131, 20, 245, 44, 156, 154, 131, 49)]
public interface IBindableIterator
Public Interface IBindableIterator
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

This interface supports the creation of data bindable collections in C++. When programming with .NET, you should use ObservableCollection(Of T) or implement IList and INotifyCollectionChanged. For more info, see Binding to collections.

C++/WinRT extension functions

Note

Extension functions exist on the C++/WinRT projection types for certain Windows Runtime APIs. For example, winrt::Windows::Foundation::IAsyncAction is the C++/WinRT projection type for IAsyncAction. The extension functions aren't part of the application binary interface (ABI) surface of the actual Windows Runtime types, so they're not listed as members of the Windows Runtime APIs. But you can call them from within any C++/WinRT project. See C++/WinRT functions that extend Windows Runtime APIs.

auto begin() const;

Returns an iterator to the first element of the collection, for use in C++ algorithms such as range-based for loops.

auto end() const;

Returns an iterator to one past the last element of the collection, for use in C++ algorithms such as range-based for loops.

operator++();
operator++(int);

These operators permit ranged-for loops over Windows Runtime iterable objects. The prefix and postfix ++ operator advances the iterator, and sets it to nullptr if the iterator has completed.

T operator*() const;

Dereferencing the iterator is equivalent to calling Current.

using iterator_concept= std::input_iterator_tag;
using iterator_catetory = std::input_iterator_tag;
using value_type = T;
using difference_type = ptrdiff_t;
using pointer = void;
using reference = T;

Nested types that improve interoperability with C++ iterators.

Properties

Current

Gets the current item in the collection.

HasCurrent

Gets a value that indicates whether there is a current item or the iterator is at the end of the collection.

Methods

MoveNext()

Moves the iterator forward to the next item and returns HasCurrent.

Applies to

See also