![]() |
MCRO
C++23 utilities for Unreal Engine.
|
Namespace for utilities handling Unreal modules. More...
Data Structures | |
| struct | FObserveModuleListener |
| A record for the module event listeners. More... | |
| class | IObservableModule |
| Add this interface to your module class if other things can listen to module startup or shutdown. More... | |
| struct | TModuleBoundObject |
| A wrapper around a given object which lifespan is bound to given module. More... | |
| struct | TObserveModule |
| Use this in global variables to automatically do things on module startup or shutdown. More... | |
Concepts | |
| concept | CObservableModule |
Functions | |
| template<CDerivedFrom< IModuleInterface > M> | |
| FString | InferModuleName () |
| Infer the module name from an input type. This exists because there's a very reliable naming convention for class names representing modules. The inference is removing the first letter Hungarian type notation and removing "Module" or "ModuleInterface" from the end. | |
| template<CDerivedFrom< IModuleInterface > M> | |
| TMaybe< M * > | TryLoadUnrealModule () |
| Try to load a module and return an IError when that fails for any reason. Module name is inferred from type described in. | |
| template<CDerivedFrom< IModuleInterface > M> | |
| M & | LoadUnrealModule () |
| Load a module or crash with IError if it cannot be done for any reason Module name is inferred from type described in. | |
| template<CDerivedFrom< IModuleInterface > M> | |
| M * | GetUnrealModulePtr () |
| Shorthand for FModuleManager::GetModulePtr with the name inferred from given type. | |
| template<CDerivedFrom< IModuleInterface > M> | |
| M & | GetUnrealModule () |
| Get an already loaded unreal module. If for any reason it's not loaded, crash the app. | |
Namespace for utilities handling Unreal modules.
| M & Mcro::Modules::GetUnrealModule | ( | ) |
Get an already loaded unreal module. If for any reason it's not loaded, crash the app.
| M * Mcro::Modules::GetUnrealModulePtr | ( | ) |
Shorthand for FModuleManager::GetModulePtr with the name inferred from given type.
| FString Mcro::Modules::InferModuleName | ( | ) |
Infer the module name from an input type. This exists because there's a very reliable naming convention for class names representing modules. The inference is removing the first letter Hungarian type notation and removing "Module" or "ModuleInterface" from the end.
| M | the supposed type of the module |
| M & Mcro::Modules::LoadUnrealModule | ( | ) |
Load a module or crash with IError if it cannot be done for any reason Module name is inferred from type described in.
| TMaybe< M * > Mcro::Modules::TryLoadUnrealModule | ( | ) |
Try to load a module and return an IError when that fails for any reason. Module name is inferred from type described in.