![]() |
MCRO
C++23 utilities for Unreal Engine.
|
A struct to emulate regular C++ RAII object behavior with UObjects. When this struct is instantiated the given object type is also created. An object wrapped in this struct is never invalid, and doesn't get garbage collected until it's in scope. More...
#include <ScopeObject.h>
Public Member Functions | |
| template<typename... Args> | |
| TScopeObject (FConstructObjectParameters &¶ms, Args &&... args) | |
| const T * | operator-> () const |
| T * | operator-> () |
| operator const T * () const | |
| operator T* () | |
| T const & | Get () const |
| T & | Get () |
A struct to emulate regular C++ RAII object behavior with UObjects. When this struct is instantiated the given object type is also created. An object wrapped in this struct is never invalid, and doesn't get garbage collected until it's in scope.
It is safe to create this struct on any thread, GC is deferred until constructor is finished. The underlying storage is a TStrongObjectPtr.
If the given object type happen to have an Intialize member method, that's also called with the extra arguments provided in the constructor.
Definition at line 33 of file ScopeObject.h.
|
inline |
Definition at line 36 of file ScopeObject.h.
|
inline |
Definition at line 49 of file ScopeObject.h.
|
inline |
Definition at line 48 of file ScopeObject.h.
|
inline |
Definition at line 45 of file ScopeObject.h.
|
inline |
Definition at line 46 of file ScopeObject.h.
|
inline |
Definition at line 43 of file ScopeObject.h.
|
inline |
Definition at line 42 of file ScopeObject.h.