UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ObjectPtr_Private Namespace Reference

Classes

struct  Friend
 
class  TNonAccessTrackedObjectPtr
 
struct  TRawPointerType
 
struct  TRawPointerType< const TObjectPtr< T > >
 
struct  TRawPointerType< const volatile TObjectPtr< T > >
 
struct  TRawPointerType< TObjectPtr< T > >
 
struct  TRawPointerType< volatile TObjectPtr< T > >
 

Functions

template<typename T >
FORCEINLINE const T * CoerceToPointer (const T *Other)
 
template<typename T , typename U >
FORCEINLINE std::common_type_t< const T *, U > CoerceToPointer (const U &Other)
 
template<typename T , typename U >
FORCEINLINE auto CoerceToPointer (const U &Other) -> decltype(Other.Get())
 
template<typename T , typename U >
bool IsObjectPtrEqualToRawPtrOfRelatedType (const TObjectPtr< T > &Ptr, const U *Other)
 
template<typename T , typename U , decltype(CoerceToPointer< T >(std::declval< U >())==std::declval< const T * >()) * = nullptr>
bool IsObjectPtrEqual (const TObjectPtr< T > &Ptr, const U &Other)
 
template<typename T >
FORCEINLINE bool IsObjectPtrNull (const FObjectPtr &ObjectPtr)
 
template<typename T >
FORCEINLINE T * Get (const FObjectPtr &ObjectPtr)
 
template<typename T , int = sizeof(T)>
char(& ResolveTypeIsComplete (int))[2]
 
template<typename T >
char(& ResolveTypeIsComplete (...))[1]
 

Function Documentation

◆ CoerceToPointer() [1/3]

template<typename T >
FORCEINLINE const T * ObjectPtr_Private::CoerceToPointer ( const T *  Other)

Coerce to pointer through implicit conversion to const T* (overload through less specific "const T*" parameter to avoid ambiguity with other coercion options that may also exist.

◆ CoerceToPointer() [2/3]

template<typename T , typename U >
FORCEINLINE std::common_type_t< const T *, U > ObjectPtr_Private::CoerceToPointer ( const U &  Other)

Coerce to pointer through implicit conversion to CommonPointerType where CommonPointerType is deduced, and must be a C++ pointer, not a wrapper type.

◆ CoerceToPointer() [3/3]

template<typename T , typename U >
FORCEINLINE auto ObjectPtr_Private::CoerceToPointer ( const U &  Other) -> decltype(Other.Get())

Coerce to pointer through the use of a ".Get()" member, which is the convention within Unreal smart pointer types.

◆ Get()

template<typename T >
FORCEINLINE T * ObjectPtr_Private::Get ( const FObjectPtr ObjectPtr)

Resolve and return the underlying reference.

◆ IsObjectPtrEqual()

template<typename T , typename U , decltype(CoerceToPointer< T >(std::declval< U >())==std::declval< const T * >()) * = nullptr>
bool ObjectPtr_Private::IsObjectPtrEqual ( const TObjectPtr< T > &  Ptr,
const U &  Other 
)

Perform shallow equality check between a TObjectPtr and another (non TObjectPtr) type that we can coerce to a pointer.

◆ IsObjectPtrEqualToRawPtrOfRelatedType()

template<typename T , typename U >
bool ObjectPtr_Private::IsObjectPtrEqualToRawPtrOfRelatedType ( const TObjectPtr< T > &  Ptr,
const U *  Other 
)

◆ IsObjectPtrNull()

template<typename T >
FORCEINLINE bool ObjectPtr_Private::IsObjectPtrNull ( const FObjectPtr ObjectPtr)

Check for NULL without resolving the handle.

◆ ResolveTypeIsComplete() [1/2]

template<typename T >
char(& ObjectPtr_Private::ResolveTypeIsComplete (   ...) )[1]

◆ ResolveTypeIsComplete() [2/2]

template<typename T , int = sizeof(T)>
char(& ObjectPtr_Private::ResolveTypeIsComplete ( int  ) )[2]