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

#include <Module.h>

Inherited by AZ::AzCoreModule.

Public Member Functions

 AZ_RTTI (Module, "{59682E0E-731F-4361-BC0B-039BC5376CA1}")
 
 AZ_CLASS_ALLOCATOR (Module, AZ::SystemAllocator)
 
 Module ()
 
virtual ~Module ()
 
 Module (const Module &)=delete
 
Moduleoperator= (const Module &)=delete
 
void Reflect (AZ::ReflectContext *)
 
virtual ComponentTypeList GetRequiredSystemComponents () const
 
void RegisterComponentDescriptors ()
 
AZStd::list< AZ::ComponentDescriptor * > GetComponentDescriptors () const
 

Protected Attributes

AZStd::list< AZ::ComponentDescriptor * > m_descriptors
 

Detailed Description

AZ::Module enables static and dynamic modules (aka LIBs and DLLs) to connect with the running AZ::ComponentApplication.

Each module should contain a class which inherits from AZ::Module. This class must perform tasks such as reflecting the classes within the module and adding critical components to the system entity.

Constructor & Destructor Documentation

◆ Module()

AZ::Module::Module ( )

Override to register the module's ComponentDescriptors.

Example:

MyModule::MyModule()
: AZ::Module()
{
m_descriptors.insert(m_descriptors.end(), {
MyAwesomeComponent::CreateDescriptor(),
});
};
Reopen namespace to define DataPatch class.
Definition: AssetCommon.h:26

◆ ~Module()

virtual AZ::Module::~Module ( )
virtual

Releases all descriptors in m_descriptors.

Member Function Documentation

◆ GetRequiredSystemComponents()

virtual ComponentTypeList AZ::Module::GetRequiredSystemComponents ( ) const
inlinevirtual

Override to require specific components on the system entity.

Returns
The type-ids of required components.

Reimplemented in AZ::AzCoreModule.

◆ Reflect()

void AZ::Module::Reflect ( AZ::ReflectContext )
inline

DO NOT OVERRIDE. This method will return in the future, but at this point things reflected here are not unreflected for all ReflectContexts (Serialize, Editor, Network, Script, etc.) Place all calls to non-component reflect functions inside of a component reflect function to ensure that your types are unreflected.


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