UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TNonNullSubclassOf< T > Class Template Reference

#include <NonNullSubclassOf.h>

+ Inheritance diagram for TNonNullSubclassOf< T >:

Public Types

using IntrusiveUnsetOptionalStateType = TNonNullSubclassOf
 
- Public Types inherited from TSubclassOf< T >
using ElementType = T
 

Public Member Functions

UE_FORCEINLINE_HINT TNonNullSubclassOf (EDefaultConstructNonNullSubclassOf)
 
template<typename PtrType UE_REQUIRES>
 TNonNullSubclassOf (PtrType *From)
 
template<typename U >
UE_FORCEINLINE_HINT TNonNullSubclassOf (const TSubclassOf< U > &From)
 
template<typename U >
TNonNullSubclassOfoperator= (const TSubclassOf< U > &From)
 
template<typename PtrType >
TNonNullSubclassOfoperator= (PtrType *From)
 
UE_FORCEINLINE_HINT TNonNullSubclassOf (FIntrusiveUnsetOptionalState)
 
UE_FORCEINLINE_HINT bool operator== (FIntrusiveUnsetOptionalState) const
 
- Public Member Functions inherited from TSubclassOf< T >
 TSubclassOf ()=default
 
 TSubclassOf (TSubclassOf &&)=default
 
 TSubclassOf (const TSubclassOf &)=default
 
TSubclassOfoperator= (TSubclassOf &&)=default
 
TSubclassOfoperator= (const TSubclassOf &)=default
 
 ~TSubclassOf ()=default
 
UE_FORCEINLINE_HINT TSubclassOf (UClass *From)
 
template<typename U UE_REQUIRES>
UE_FORCEINLINE_HINT TSubclassOf (U &&From)
 
template<typename OtherT >
 TSubclassOf (const TSubclassOf< OtherT > &Other)
 
template<typename OtherT >
TSubclassOfoperator= (const TSubclassOf< OtherT > &Other)
 
TSubclassOfoperator= (UClass *From)
 
template<typename U UE_REQUIRES>
TSubclassOfoperator= (U &&From)
 
UClassoperator* () const
 
UE_FORCEINLINE_HINT UClassGet () const
 
UE_FORCEINLINE_HINT UClassoperator-> () const
 
UE_FORCEINLINE_HINT operator UClass * () const
 
T * GetDefaultObject () const
 
UE_FORCEINLINE_HINT void Serialize (FArchive &Ar)
 
UE_FORCEINLINE_HINT void Serialize (FStructuredArchiveSlot &Slot)
 
TObjectPtr< UClass > & GetGCPtr ()
 

Static Public Attributes

static constexpr bool bHasIntrusiveUnsetOptionalState = true
 

Detailed Description

template<typename T>
class TNonNullSubclassOf< T >

Template to allow TClassType's to be passed around with type safety

Member Typedef Documentation

◆ IntrusiveUnsetOptionalStateType

template<typename T >
using TNonNullSubclassOf< T >::IntrusiveUnsetOptionalStateType = TNonNullSubclassOf

Constructor & Destructor Documentation

◆ TNonNullSubclassOf() [1/4]

Default Constructor, defaults to null

◆ TNonNullSubclassOf() [2/4]

template<typename T >
template<typename PtrType UE_REQUIRES>
TNonNullSubclassOf< T >::TNonNullSubclassOf ( PtrType *  From)
inline

Constructor that takes a UClass* or FFieldClass* if T is a UObject or a FField type respectively.

◆ TNonNullSubclassOf() [3/4]

template<typename T >
template<typename U >
UE_FORCEINLINE_HINT TNonNullSubclassOf< T >::TNonNullSubclassOf ( const TSubclassOf< U > &  From)
inline

Copy Constructor, will only compile if types are compatible

◆ TNonNullSubclassOf() [4/4]

Member Function Documentation

◆ operator=() [1/2]

template<typename T >
template<typename U >
TNonNullSubclassOf & TNonNullSubclassOf< T >::operator= ( const TSubclassOf< U > &  From)
inline

Assignment operator, will only compile if types are compatible

◆ operator=() [2/2]

template<typename T >
template<typename PtrType >
TNonNullSubclassOf & TNonNullSubclassOf< T >::operator= ( PtrType *  From)
inline

Assignment operator from UClass, the type is checked on get not on set

◆ operator==()

template<typename T >
UE_FORCEINLINE_HINT bool TNonNullSubclassOf< T >::operator== ( FIntrusiveUnsetOptionalState  ) const
inline

Member Data Documentation

◆ bHasIntrusiveUnsetOptionalState

template<typename T >
constexpr bool TNonNullSubclassOf< T >::bHasIntrusiveUnsetOptionalState = true
staticconstexpr

The documentation for this class was generated from the following file: