21template<
typename BaseType>
25template<
typename BaseType>
30 template<
typename BaseType,
bool bIsStrong>
31 struct TPtrVariantBase;
48 template<
typename BaseType,
bool bIsStrong>
84 if constexpr (std::is_base_of_v<UObject, DerivedType>)
112 if constexpr (std::is_same_v<StoredValueType, SharedType>)
128 if constexpr (std::is_same_v<StoredValueType, SharedType>)
156 const BaseType* GetRawPtrValue_Internal()
const
161 if constexpr (std::is_same_v<StoredValueType, SharedType>)
188 return Lhs.GetRawPtrValue_Internal() == Rhs.GetRawPtrValue_Internal();
191 template <
typename LhsType,
bool bLhsStrength,
typename RhsType,
bool bRhsStrength>
194 return !(Lhs == Rhs);
202 return Lhs == Rhs.GetRawPtrValue_Internal();
205 template<
typename LhsType,
typename RhsType,
bool bRhsStrength>
208 return !(Lhs == Rhs);
216 return Lhs.GetRawPtrValue_Internal() == Rhs;
219 template<
typename LhsType,
bool bLhsStrength,
typename RhsType>
222 return !(Lhs == Rhs);
226template<
typename BaseType>
245 }, Super::PtrVariant);
267 }, Super::PtrVariant);
276template<
typename BaseType>
301 }, Super::PtrVariant);
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_REQUIRES_DEFINITION(...)
Definition Requires.h:88
#define UE_REQUIRES_FRIEND(...)
Definition Requires.h:87
#define UE_REQUIRES(...)
Definition Requires.h:86
#define UE_REQUIRES_EXPR(...)
Definition Requires.h:89
decltype(auto) Visit(Func &&Callable, Variants &&... Args)
Definition TVariant.h:271
Definition SharedPointer.h:1295
implementation
Definition PlayInEditorLoadingScope.h:8
bool operator==(const TPtrVariantBase< LhsType, bLhsStrength > &Lhs, const TPtrVariantBase< RhsType, bRhsStrength > &Rhs)
Definition PointerVariants.h:186
bool operator!=(const TPtrVariantBase< LhsType, bLhsStrength > &Lhs, const TPtrVariantBase< RhsType, bRhsStrength > &Rhs)
Definition PointerVariants.h:192
Definition PointerVariants.h:228
TWeakPtrVariant< BaseType > ToWeakVariant() const
Definition PointerVariants.h:248
BaseType * Get() const
Definition PointerVariants.h:232
Definition WeakObjectPtrTemplates.h:25
Definition PointerVariants.h:278
TStrongPtrVariant< BaseType > Pin() const
Definition PointerVariants.h:282
Definition PointerVariants.h:57
std::conditional_t< bIsStrong, TStrongObjectPtr< const UObject >, TWeakObjectPtr< const UObject > > ObjectPtrType
Definition PointerVariants.h:58
FObjectPtrWrapper(const UObject *InObjectPtr, BaseType *const InCastedPtr)
Definition PointerVariants.h:60
BaseType * CastedPtr
Definition PointerVariants.h:67
ObjectPtrType ObjectPtr
Definition PointerVariants.h:66
Definition PointerVariants.h:50
friend bool operator==(const TPtrVariantBase< LhsType, bLhsStrength > &Lhs, const TPtrVariantBase< RhsType, bRhsStrength > &Rhs)
Definition PointerVariants.h:186
friend struct TWeakPtrVariant< BaseType >
Definition PointerVariants.h:51
constexpr TPtrVariantBase()=default
bool IsValid() const
Definition PointerVariants.h:107
friend bool operator==(const TPtrVariantBase< LhsType, bLhsStrength > &Lhs, RhsType *Rhs)
Definition PointerVariants.h:214
friend bool operator==(LhsType *Lhs, const TPtrVariantBase< RhsType, bRhsStrength > &Rhs)
Definition PointerVariants.h:200
TPtrVariantBase & operator=(TYPE_OF_NULLPTR)
Definition PointerVariants.h:101
std::conditional_t< bIsStrong, TSharedPtr< BaseType >, TWeakPtr< BaseType > > SharedType
Definition PointerVariants.h:54
constexpr TPtrVariantBase(DerivedType *InDerived)
Definition PointerVariants.h:80
constexpr TPtrVariantBase(TYPE_OF_NULLPTR)
Definition PointerVariants.h:72
void Reset()
Definition PointerVariants.h:123
friend struct TStrongPtrVariant< BaseType >
Definition PointerVariants.h:52