Karma Engine
Loading...
Searching...
No Matches
Karma::TSubclassOf< TClass > Class Template Reference

#include <SubClassOf.h>

Public Types

typedef TChooseClass< TIsDerivedFrom< TClass, FField >::IsDerived, FFieldClass, UClass >::Result TClassType
 
typedef TChooseClass< TIsDerivedFrom< TClass, FField >::IsDerived, FField, UObject >::Result TBaseType
 

Public Member Functions

 TSubclassOf ()
 
 TSubclassOf (TClassType *From)
 
template<typename U , std::enable_if_t< !TIsTSubclassOf< std::decay_t< U > >::Value, decltype(ImplicitConv< TClassType * >(std::declval< U >())) > * = nullptr>
 TSubclassOf (U &&From)
 
template<class TClassA , class = decltype(ImplicitConv<TClass*>((TClassA*)nullptr))>
 TSubclassOf (const TSubclassOf< TClassA > &From)
 
template<class TClassA , class = decltype(ImplicitConv<TClass*>((TClassA*)nullptr))>
TSubclassOfoperator= (const TSubclassOf< TClassA > &From)
 
TSubclassOfoperator= (TClassType *From)
 
template<typename U , std::enable_if_t< !TIsTSubclassOf< std::decay_t< U > >::Value, decltype(ImplicitConv< TClassType * >(std::declval< U >())) > * = nullptr>
TSubclassOfoperator= (U &&From)
 
TClassType * operator* () const
 
TClassType * Get () const
 
TClassType * operator-> () const
 
 operator TClassType * () const
 
TClass * GetDefaultObject () const
 

Detailed Description

template<class TClass>
class Karma::TSubclassOf< TClass >

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

Constructor & Destructor Documentation

◆ TSubclassOf() [1/4]

template<class TClass >
Karma::TSubclassOf< TClass >::TSubclassOf ( )
inline

Default Constructor, defaults to null

◆ TSubclassOf() [2/4]

template<class TClass >
Karma::TSubclassOf< TClass >::TSubclassOf ( TClassType * From)
inline

Constructor that takes a UClass and does a runtime check to make sure this is a compatible class

◆ TSubclassOf() [3/4]

template<class TClass >
template<typename U , std::enable_if_t< !TIsTSubclassOf< std::decay_t< U > >::Value, decltype(ImplicitConv< TClassType * >(std::declval< U >())) > * = nullptr>
Karma::TSubclassOf< TClass >::TSubclassOf ( U && From)
inline

Constructor that takes a UClass and does a runtime check to make sure this is a compatible class

◆ TSubclassOf() [4/4]

template<class TClass >
template<class TClassA , class = decltype(ImplicitConv<TClass*>((TClassA*)nullptr))>
Karma::TSubclassOf< TClass >::TSubclassOf ( const TSubclassOf< TClassA > & From)
inline

Copy Constructor, will only compile if types are compatible

Member Function Documentation

◆ Get()

template<class TClass >
TClassType * Karma::TSubclassOf< TClass >::Get ( ) const
inline

Dereference back into a UClass

◆ GetDefaultObject()

template<class TClass >
TClass * Karma::TSubclassOf< TClass >::GetDefaultObject ( ) const
inline

Get the CDO if we are referencing a valid class

Returns
the CDO, or null if class is null

◆ operator TClassType *()

template<class TClass >
Karma::TSubclassOf< TClass >::operator TClassType * ( ) const
inline

Implicit conversion to UClass

◆ operator*()

template<class TClass >
TClassType * Karma::TSubclassOf< TClass >::operator* ( ) const
inline

Dereference back into a UClass, does runtime type checking

◆ operator->()

template<class TClass >
TClassType * Karma::TSubclassOf< TClass >::operator-> ( ) const
inline

Dereference back into a UClass

◆ operator=() [1/3]

template<class TClass >
template<class TClassA , class = decltype(ImplicitConv<TClass*>((TClassA*)nullptr))>
TSubclassOf & Karma::TSubclassOf< TClass >::operator= ( const TSubclassOf< TClassA > & From)
inline

Assignment operator, will only compile if types are compatible

◆ operator=() [2/3]

template<class TClass >
TSubclassOf & Karma::TSubclassOf< TClass >::operator= ( TClassType * From)
inline

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

◆ operator=() [3/3]

template<class TClass >
template<typename U , std::enable_if_t< !TIsTSubclassOf< std::decay_t< U > >::Value, decltype(ImplicitConv< TClassType * >(std::declval< U >())) > * = nullptr>
TSubclassOf & Karma::TSubclassOf< TClass >::operator= ( U && From)
inline

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


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