MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Modules::TModuleBoundObject< M, T > Struct Template Reference

A wrapper around a given object which lifespan is bound to given module. More...

#include <Modules.h>

Data Structures

struct  FObjectFactory
 

Public Types

using StorageType
 

Public Member Functions

 TModuleBoundObject (FObjectFactory &&factory={})
 
T & GetChecked ()
 
T const & GetChecked () const
 
T * TryGet ()
 
const T * TryGet () const
 

Detailed Description

template<CObservableModule M, typename T>
struct Mcro::Modules::TModuleBoundObject< M, T >

A wrapper around a given object which lifespan is bound to given module.

Definition at line 230 of file Modules.h.

Member Typedef Documentation

◆ StorageType

template<CObservableModule M, typename T >
using Mcro::Modules::TModuleBoundObject< M, T >::StorageType
Initial value:
std::conditional_t<
CSharedFromThis<T>,
TSharedPtr<T>,
TUniquePtr<T>
>

Definition at line 232 of file Modules.h.

Constructor & Destructor Documentation

◆ TModuleBoundObject()

template<CObservableModule M, typename T >
Mcro::Modules::TModuleBoundObject< M, T >::TModuleBoundObject ( FObjectFactory && factory = {})
inline

Definition at line 245 of file Modules.h.

Member Function Documentation

◆ GetChecked() [1/2]

template<CObservableModule M, typename T >
T & Mcro::Modules::TModuleBoundObject< M, T >::GetChecked ( )
inline

Definition at line 261 of file Modules.h.

◆ GetChecked() [2/2]

template<CObservableModule M, typename T >
T const & Mcro::Modules::TModuleBoundObject< M, T >::GetChecked ( ) const
inline

Definition at line 271 of file Modules.h.

◆ TryGet() [1/2]

template<CObservableModule M, typename T >
T * Mcro::Modules::TModuleBoundObject< M, T >::TryGet ( )
inline

Definition at line 281 of file Modules.h.

◆ TryGet() [2/2]

template<CObservableModule M, typename T >
const T * Mcro::Modules::TModuleBoundObject< M, T >::TryGet ( ) const
inline

Definition at line 282 of file Modules.h.


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