IBindableIterator 介面

定義

支援集合上的可系結反復專案。

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
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

此介面支援在 C++ 中建立可系結的資料集合。 使用 .NET 進行程式設計時,您應該使用 ObservableCollection (Of T) 或實作 IListINotifyCollectionChanged。 如需詳細資訊,請參閱 系結至集合

C++/WinRT 擴充功能函式

注意

延伸模組函式存在於特定Windows 執行階段 API 的 C++/WinRT 投影類型上。 例如,winrt::Windows::Foundation::IAsyncAction 是 IAsyncAction的 C++/WinRT 投影類型。 擴充函式不是應用程式二進位介面的一部分, (實際Windows 執行階段類型的 ABI) 介面,因此它們不會列為Windows 執行階段 API 的成員。 但您可以從任何 C++/WinRT 專案內呼叫它們。 請參閱擴充 Windows 執行階段 API 的 C++/WinRT 函式

auto begin() const;

傳回反覆運算器給集合的第一個元素,以在 C++ 演算法中使用,例如範圍型 for 迴圈。

auto end() const;

將反覆運算器傳回至集合最後一個元素之後的反覆運算器,以用於 C++ 演算法,例如範圍型 for 迴圈。

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

這些運算子允許Windows 執行階段可逐一查看物件的範圍 for 迴圈。 前置詞和後置 ++ 運算子會前進反覆運算器,並在反覆運算器完成時將其設定為 nullptr

T operator*() const;

取消參考反覆運算器相當於呼叫 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;

可改善與 C++ 反覆運算器的互通性的巢狀類型。

屬性

Current

取得集合中的目前項目。

HasCurrent

取得值,指出目前專案或反覆運算器位於集合結尾。

方法

MoveNext()

將反覆運算器向前移至下一個專案,並傳回 HasCurrent

適用於

另請參閱