Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::ModuleManagerRequests Class Referenceabstract

Requests related to module reloading. More...

#include <ModuleManagerBus.h>

Inherits AZ::EBusTraits.

Public Types

using EnumerateModulesCallback = AZStd::function< bool(const ModuleData &moduleData)>
 
using LoadModuleOutcome = AZ::Outcome< AZStd::shared_ptr< ModuleData >, AZStd::string >
 
using LoadModulesResult = AZStd::vector< LoadModuleOutcome >
 
using PreModuleLoadEvent = AZ::Event< AZStd::string_view >
 
- Public Types inherited from AZ::EBusTraits
using AllocatorType = AZ::Internal::EBusEnvironmentAllocator
 
using BusIdType = NullBusId
 
using BusIdOrderCompare = NullBusIdCompare
 
using BusHandlerOrderCompare = BusHandlerCompareDefault
 
using MutexType = NullMutex
 
using EventQueueMutexType = NullMutex
 
template<class Bus >
using ConnectionPolicy = EBusConnectionPolicy< Bus >
 
template<class Context >
using StoragePolicy = EBusEnvironmentStoragePolicy< Context >
 
template<class Bus >
using RouterPolicy = EBusRouterPolicy< Bus >
 
using EventProcessingPolicy = EBusEventProcessingPolicy
 
template<typename DispatchMutex , bool IsLocklessDispatch>
using DispatchLockGuard = AZStd::conditional_t< IsLocklessDispatch, AZ::Internal::NullLockGuard< DispatchMutex >, AZStd::scoped_lock< DispatchMutex > >
 
template<typename ContextMutex >
using ConnectLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 
template<typename ContextMutex >
using BindLockGuard = AZStd::scoped_lock< ContextMutex >
 
template<typename ContextMutex >
using CallstackTrackerLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 

Public Member Functions

virtual void EnumerateModules (EnumerateModulesCallback perModuleCallback)=0
 Calls cb on all loaded modules.
 
virtual LoadModuleOutcome LoadDynamicModule (const char *modulePath, ModuleInitializationSteps lastStepToPerform, bool maintainReference)=0
 
virtual LoadModulesResult LoadDynamicModules (const ModuleDescriptorList &modules, ModuleInitializationSteps lastStepToPerform, bool maintainReferences)=0
 
virtual LoadModulesResult LoadStaticModules (CreateStaticModulesCallback staticModulesCb, ModuleInitializationSteps lastStepToPerform)=0
 
virtual bool IsModuleLoaded (const char *modulePath)=0
 

Public Attributes

PreModuleLoadEvent m_preModuleLoadEvent
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 
- Static Public Attributes inherited from AZ::EBusTraits
static constexpr EBusHandlerPolicy HandlerPolicy = EBusHandlerPolicy::Multiple
 
static constexpr EBusAddressPolicy AddressPolicy = EBusAddressPolicy::Single
 
static constexpr bool EnableEventQueue = false
 
static constexpr bool EventQueueingActiveByDefault = true
 
static constexpr bool EnableQueuedReferences = false
 
static constexpr bool LocklessDispatch = false
 

Additional Inherited Members

- Protected Member Functions inherited from AZ::EBusTraits
 ~EBusTraits ()=default
 

Detailed Description

Requests related to module reloading.

Member Function Documentation

◆ IsModuleLoaded()

virtual bool AZ::ModuleManagerRequests::IsModuleLoaded ( const char *  modulePath)
pure virtual

Determine if a module defined by its module path is loaded

Parameters
modulePaththe absolute path to the module to determine if its loaded.
Returns
true if the given module is already loaded (performs module path resolving just like LoadDynamicModule does)

◆ LoadDynamicModule()

virtual LoadModuleOutcome AZ::ModuleManagerRequests::LoadDynamicModule ( const char *  modulePath,
ModuleInitializationSteps  lastStepToPerform,
bool  maintainReference 
)
pure virtual

Load a module, instantiate its AZ::Module class, register it's components, and return a pointer to the data to the caller. Module references are shared (shared_ptr), so subsequent Load calls for the same modules will share instances of the ModuleData.

Note
Does NOT populate m_moduleEntity.
Parameters
modulePaththe path to the module to load.
lastStepToPerformthe final step the procedure will complete, after completing all previous steps.
maintainReferenceif true, the ModuleManager will capture its own reference to the module, ensuring it isn't unloaded until application shutdown.
Returns
a pointer to the ModuleData on success, and error on failure.

◆ LoadDynamicModules()

virtual LoadModulesResult AZ::ModuleManagerRequests::LoadDynamicModules ( const ModuleDescriptorList modules,
ModuleInitializationSteps  lastStepToPerform,
bool  maintainReferences 
)
pure virtual

Loads a list of dynamic modules, and initializes it up to the point specified.

Parameters
modulesthe list of module references to load.
lastStepToPerformthe final step of the procedure will complete, after completing all previous steps.
maintainReferencesif true, the ModuleManager will capture its own references to the modules, ensuring they aren't unloaded until application shutdown.

◆ LoadStaticModules()

virtual LoadModulesResult AZ::ModuleManagerRequests::LoadStaticModules ( CreateStaticModulesCallback  staticModulesCb,
ModuleInitializationSteps  lastStepToPerform 
)
pure virtual

Loads a static modules, and initializes it up to the point specified.

Parameters
staticModulesCbthe callback which creates the static modules.
lastStepToPerformthe final step of the procedure will complete, after completing all previous steps.

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