IIterator<T> 인터페이스

정의

컬렉션에 대한 간단한 반복을 지원합니다.

public interface class IIterator
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1786374243, 17152, 17818, 153, 102, 203, 182, 96, 150, 62, 225)]
template <typename T>
struct IIterator
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.Guid(1786374243, 17152, 17818, 153, 102, 203, 182, 96, 150, 62, 225)]
public interface IIterator<T>
Public Interface IIterator(Of T)

형식 매개 변수

T
파생
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.FoundationContract (v1.0에서 도입되었습니다.)

설명

IIterator<T> 인터페이스는 .NET의 언어 프로젝션에 의해 명시적으로 숨겨지지 않지만 IIterable\<T\> 인터페이스는 숨겨집니다. 반복기 개체에 대한 API가 특히 필요한 대부분의 .NET 시나리오의 경우 IEnumerable T 호출에서 얻은 IEnumerator<T>(특정 형식 제약 조건 포함)를 사용할 수 있습니다<>. GetEnumerator.

요소 추가, 수정 또는 삭제와 같이 컬렉션이 변경되면 반복기에서 모든 작업에 대한 예외를 발생시키는 것이 허용됩니다.

C++/WinRT 확장 함수

참고

확장 함수는 특정 Windows 런타임 API에 대한 C++/WinRT 프로젝션 형식에 있습니다. 예를 들어 winrt::Windows::Foundation::IAsyncAction은 IAsyncAction 에 대한 C++/WinRT 프로젝션 형식 입니다. 확장 함수는 실제 Windows 런타임 형식의 ABI(애플리케이션 이진 인터페이스) 화면의 일부가 아니므로 Windows 런타임 API의 멤버로 나열되지 않습니다. 그러나 C++/WinRT 프로젝트 내에서 호출할 수 있습니다. Windows 런타임 API를 확장하는 C++/WinRT 함수를 참조하세요.

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

이러한 연산자는 반복 가능한 개체를 Windows 런타임 범위 지정 루프를 허용합니다. 접두사 및 후 ++ 위 연산자는 반복기를 진행하여 반복기가 완료된 경우 로 설정합니다 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

반복기가 현재 항목을 참조하는지 아니면 컬렉션의 끝에 있는지 여부를 나타내는 값을 가져옵니다.

메서드

GetMany(T[])

반복기에서 여러 항목을 검색합니다.

C++/WinRT C++/WinRT 언어 프로젝션의 올바른 구문은 입니다 uint32_t GetMany(winrt::array_view<T> items);.

MoveNext()

반복기를 컬렉션의 다음 항목으로 이동합니다.

적용 대상

추가 정보