다음을 통해 공유


ComPtrRef 클래스

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

구문

template <typename T>
class ComPtrRef : public ComPtrRefBase<T>;

매개 변수

T
ComPtr<T> 형식 또는 이 형식에서 파생된 형식이며, 단순히 .에서 나타내는 ComPtr인터페이스가 아닙니다.

설명

형식 ComPtr<T>의 개체에 대한 참조를 나타냅니다.

멤버

공용 생성자

속성 설명
ComPtrRef::ComPtrRef 지정된 포인터에서 다른 ComPtrRef 개체로 ComPtrRef 클래스의 새 인스턴스를 초기화합니다.

공용 메서드

이름 설명
ComPtrRef::GetAddressOf 현재 ComPtrRef 개체가 나타내는 인터페이스에 대한 포인터의 주소를 검색합니다.
ComPtrRef::ReleaseAndGetAddressOf 현재 ComPtrRef 개체를 삭제하고 개체가 나타내는 인터페이스에 대한 포인터-포인터를 ComPtrRef 반환합니다.

Public 연산자

이름 설명
ComPtrRef::operator InterfaceType** 현재 ComPtrRef 개체를 삭제하고 개체가 나타내는 인터페이스에 대한 포인터-포인터를 ComPtrRef 반환합니다.
ComPtrRef::operator T* 현재 ComPtrRef 개체의 ptr_ 데이터 멤버 값을 반환합니다.
ComPtrRef::operator void** 현재 ComPtrRef 개체를 삭제하고 개체가 포인터 포인터로 표현한 인터페이스에 ComPtrRef 포인터 void를 캐스팅한 다음 캐스트 포인터를 반환합니다.
ComPtrRef::operator* 현재 ComPtrRef 개체가 나타내는 인터페이스에 대한 포인터를 검색합니다.
ComPtrRef::operator== ComPtrRef 개체가 같은지를 나타냅니다.
ComPtrRef::operator!= ComPtrRef 개체가 같지 않은지를 나타냅니다.

상속 계층 구조

ComPtrRefBase

ComPtrRef

요구 사항

헤더: client.h

네임스페이스: Microsoft::WRL::D etails

ComPtrRef::ComPtrRef

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

ComPtrRef(
   _In_opt_ T* ptr
);

매개 변수

ptr
다른 ComPtrRef 개체의 기본 값입니다.

설명

지정된 포인터에서 다른 ComPtrRef 개체로 ComPtrRef 클래스의 새 인스턴스를 초기화합니다.

ComPtrRef::GetAddressOf

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

InterfaceType* const * GetAddressOf() const;

Return Value

현재 ComPtrRef 개체가 나타내는 인터페이스에 대한 포인터의 주소입니다.

설명

현재 ComPtrRef 개체가 나타내는 인터페이스에 대한 포인터의 주소를 검색합니다.

ComPtrRef::operator==

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

bool operator==(
   const Details::ComPtrRef<ComPtr<T>>& a,
   const Details::ComPtrRef<ComPtr<U>>& b
);

bool operator==(
   const Details::ComPtrRef<ComPtr<T>>& a,
   decltype(__nullptr)
);

bool operator==(
   decltype(__nullptr),
   const Details::ComPtrRef<ComPtr<T>>& a
);

bool operator==(
   const Details::ComPtrRef<ComPtr<T>>& a,
   void* b
);

bool operator==(
   void* b,
   const Details::ComPtrRef<ComPtr<T>>& a
);

매개 변수

a
ComPtrRef 개체에 대한 참조입니다.

b
다른 ComPtrRef 개체에 대한 참조 또는 익명 형식(void*)에 대한 포인터입니다.

Return Value

첫 번째 연산자는 개체 a가 개체 b와 같으면 생성 true 되고, false그렇지 않으면 생성됩니다.

개체가 같nullptr으면 두 번째 및 세 번째 연산자가 생성 true 되고, false그렇지 않으면 .

개체 a가 개체 b와 같으면 네 번째 및 다섯 번째 연산자가 생성 true 되고, false그렇지 않으면 생성됩니다.

설명

ComPtrRef 개체가 같은지를 나타냅니다.

ComPtrRef::operator!=

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

bool operator!=(
   const Details::ComPtrRef<ComPtr<T>>& a,
   const Details::ComPtrRef<ComPtr<U>>& b
);

bool operator!=(
   const Details::ComPtrRef<ComPtr<T>>& a,
   decltype(__nullptr)
);

bool operator!=(
   decltype(__nullptr),
   const Details::ComPtrRef<ComPtr<T>>& a
);

bool operator!=(
   const Details::ComPtrRef<ComPtr<T>>& a,
   void* b
);

bool operator!=(
   void* b,
   const Details::ComPtrRef<ComPtr<T>>& a
);

매개 변수

a
ComPtrRef 개체에 대한 참조입니다.

b
다른 ComPtrRef 개체에 대한 참조 또는 익명 개체(void*)에 대한 포인터입니다.

Return Value

첫 번째 연산자는 개체 a가 개체 b와 같지 않으면 생성 true 되고, false그렇지 않으면 생성됩니다.

개체가 같지 nullptr않으면 두 번째 및 세 번째 연산자가 생성 true 되고, false그렇지 않으면 .

개체가 개체 b와 같지 않으면 네 번째 및 다섯 번째 연산자가 생성 true 되고, false그렇지 않으면 생성됩니다.

설명

ComPtrRef 개체가 같지 않은지를 나타냅니다.

ComPtrRef::operator InterfaceType**

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

operator InterfaceType**();

설명

현재 ComPtrRef 개체를 삭제하고 개체가 나타내는 인터페이스에 대한 포인터-포인터를 ComPtrRef 반환합니다.

ComPtrRef::operator*

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

InterfaceType* operator *();

Return Value

현재 ComPtrRef 개체가 나타내는 인터페이스에 대한 포인터입니다.

설명

현재 ComPtrRef 개체가 나타내는 인터페이스에 대한 포인터를 검색합니다.

ComPtrRef::operator T*

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

operator T*();

설명

현재 ComPtrRef 개체의 ptr_ 데이터 멤버 값을 반환합니다.

ComPtrRef::operator void**

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

operator void**() const;

설명

현재 ComPtrRef 개체를 삭제하고 개체가 포인터 포인터로 표현한 인터페이스에 ComPtrRef 포인터 void를 캐스팅한 다음 캐스트 포인터를 반환합니다.

ComPtrRef::ReleaseAndGetAddressOf

WRL 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

InterfaceType** ReleaseAndGetAddressOf();

Return Value

삭제된 ComPtrRef 개체가 나타내는 인터페이스에 대한 포인터입니다.

설명

현재 ComPtrRef 개체를 삭제하고 개체가 나타내는 인터페이스에 대한 포인터-포인터를 ComPtrRef 반환합니다.