TSubclassOf

Template to allow [UClass](API\Runtime\CoreUObject\UObject\UClass) types to be passed around with type safety

Inheritance Hierarchy

TSubclassOf

TNonNullSubclassOf

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/Templates/SubclassOf.h

Include

#include "Templates/SubclassOf.h"

Syntax

template<typename T>
class TSubclassOf

Remarks

Template to allow UClass types to be passed around with type safety

Constructors

Name Description

Public function

TSubclassOf()

Public function

TSubclassOf

(
    TSubclassOf&&
)

Public function

TSubclassOf

(
    const TSubclassOf&
)

Public function

TSubclassOf

(
    UClass* From
)

Constructor that takes a UClass*.

Public function

TSubclassOf

(
    U&& From
)

Construct from a UClass* (or something implicitly convertible to it)

Public function

TSubclassOf

(
    const TSubclassOf< OtherT >& Other
)

Construct from another TSubclassOf, only if types are compatible

Destructors

Name Description

Public function

~TSubclassOf()

Functions

Name Description

Public function Const

UClass *

 

DebugAccessRawClassPtr()

This is a DEVELOPMENT ONLY debugging function and should not be relied upon.

Public function Const

UClass *

 

Get()

Dereference back into a UClass*, does runtime type checking.

Public function Const

T *

 

GetDefaultObject()

Get the CDO if we are referencing a valid class

Public function

void

 

Serialize

(
    FArchive& Ar
)

Operators

Name Description

Public function Const

 

operator UClass *()

Implicit conversion to UClass*, does runtime type checking.

Public function Const

UClass *

 

operator*()

Dereference back into a UClass*, does runtime type checking.

Public function

TSubclassOf ...

 

operator=

(
    U&& From
)

Assign from a UClass* (or something implicitly convertible to it).

Public function

TSubclassOf ...

 

operator=

(
    UClass* From
)

Assign from a UClass*.

Public function

TSubclassOf ...

 

operator=

(
    const TSubclassOf< OtherT >& Other
)

Assign from another TSubclassOf, only if types are compatible

Public function

TSubclassOf ...

 

operator=

(
    const TSubclassOf&
)

Public function

TSubclassOf ...

 

operator=

(
    TSubclassOf&&
)

Public function Const

UClass *

 

operator->()

Dereference back into a UClass*, does runtime type checking.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel