MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Types::THasTypeShareable< T > Class Template Reference

Shorthand for combination of IHaveType and TSharedFromThis where the base-type can be specified. More...

#include <Types.h>

Inheritance diagram for Mcro::Types::THasTypeShareable< T >:
Mcro::Types::IHaveType

Additional Inherited Members

- Public Types inherited from Mcro::Types::IHaveType
template<typename Self >
using SelfRef = TSharedRef<std::decay_t<Self>>
 
- Public Member Functions inherited from Mcro::Types::IHaveType
virtual ~IHaveType ()=default
 
template<CSharedFromThis Self>
SelfRef< Self > WithType (this Self &&self)
 Fluent API for setting tpye for deferred initialization (for example in factory functions)
 
template<typename Self >
requires (!CSharedFromThis<Self>)
Self && WithType (this Self &&self)
 Fluent API for setting tpye for deferred initialization (for example in factory functions)
 
FORCEINLINE FType const & GetType () const
 
FORCEINLINE FName const & GetTypeFName () const
 
FORCEINLINE FString GetTypeString () const
 
template<typename Derived , CSharedFromThis Self>
TSharedPtr< Derived > As (this Self &&self)
 Dynamic casting of this object to a derived top-level type. Casting also works if inheritance is done through TInherit template.
 
template<typename Derived , typename Self >
requires (!CSharedFromThis<Self>)
Derived * As (this Self &&self)
 Dynamic casting of this object to a derived top-level type. Casting also works if inheritance is done through TInherit template.
 
- Protected Member Functions inherited from Mcro::Types::IHaveType
template<typename Self >
void SetType (this Self &&self)
 This function needs to be called on top level derived type for runtime reflection to work.
 
- Protected Attributes inherited from Mcro::Types::IHaveType
FName TypeName
 
FType TypeInfo
 

Detailed Description

template<typename T>
class Mcro::Types::THasTypeShareable< T >

Shorthand for combination of IHaveType and TSharedFromThis where the base-type can be specified.

Definition at line 157 of file Types.h.


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