Platform::Collections::BackInsertIterator 클래스

요소를 덮어쓰지 않고 순차 컬렉션의 백 엔드에 삽입하는 반복기를 나타냅니다.

구문

template <typename T>
class BackInsertIterator :
public ::std::iterator<::std::output_iterator_tag, void, void, void, void>;

매개 변수

T
현재 컬렉션에 있는 항목의 형식입니다.

설명

BackInsertIterator 클래스는 back_insert_iterator Class에 필요한 규칙을 구현합니다.

멤버

공용 생성자

속성 설명
BackInsertIterator::BackInsertIterator BackInsertIterator 클래스의 새 인스턴스를 초기화합니다.

Public 연산자

이름 설명
BackInsertIterator::operator* 연산자 현재 BackInsertIterator에 대한 참조를 검색합니다.
BackInsertIterator::operator++ 연산자 현재 BackInsertIterator에 대한 참조를 반환합니다. 반복기는 수정되지 않습니다.
BackInsertIterator::operator= 연산자 지정된 개체를 현재 순차 컬렉션의 끝에 추가합니다.

상속 계층 구조

BackInsertIterator

요구 사항

헤더: collection.h

네임스페이스: Platform::Collections

BackInsertIterator::BackInsertIterator 생성자

BackInsertIterator 클래스의 새 인스턴스를 초기화합니다.

구문

explicit BackInsertIterator(
   Windows::Foundation::Collections::IVector<T>^ v);

매개 변수

v
IVector<T> 개체입니다.

설명

BackInsertIteratorv 매개 변수로 지정된 개체의 마지막 요소 뒤에 요소를 삽입합니다.

BackInsertIterator::operator= 연산자

지정된 개체를 현재 순차 컬렉션의 끝에 추가합니다.

구문

BackInsertIterator& operator=( const T& t);

매개 변수

t
현재 컬렉션에 추가할 개체입니다.

Return Value

현재 BackInsertIterator에 대한 참조입니다.

BackInsertIterator::operator* 연산자

현재 BackInsertIterator에 대한 참조를 검색합니다.

구문

BackInsertIterator& operator*();

Return Value

현재 BackInsertIterator에 대한 참조입니다.

설명

이 연산자는 현재 컬렉션의 요소가 아닌 현재 BackInsertIterator에 대한 참조를 반환합니다.

BackInsertIterator::operator++ 연산자

현재 BackInsertIterator에 대한 참조를 반환합니다. 반복기는 수정되지 않습니다.

구문

BackInsertIterator& operator++();

BackInsertIterator operator++(int);

Return Value

현재 BackInsertIterator에 대한 참조입니다.

설명

의도적으로, 첫 번째 구문 예는 현재 BackInsertIterator를 사전에 증가시키고 두 번째 구문은 현재 BackInsertIterator를 사후에 증가시킵니다. 두 번째 구문의 int 형식은 실제 정수 연산자가 아니라 후위 증가 연산을 나타냅니다.

그러나 이 연산자는 BackInsertIterator를 실제로 수정하지 않습니다. 대신에 수정되지 않은 현재 반복기에 대한 참조를 반환합니다. 연산자*동일한 동작입니다.

참고 항목

플랫폼 네임스페이스