Open 3D Engine AzCore API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | List of all members
AZ::MemoryComponent Class Reference

#include <MemoryComponent.h>

Inherits AZ::Component.

Public Member Functions

void Init () override
void Activate () override
void Deactivate () override
- Public Member Functions inherited from AZ::Component
 AZ_RTTI (AZ::Component, "{EDFCB2CF-F75D-43BE-B26B-F35821B29247}")
 Component ()
virtual ~Component ()
EntityGetEntity () const
EntityId GetEntityId () const
NamedEntityId GetNamedEntityId () const
ComponentId GetId () const
virtual const TypeIdGetUnderlyingComponentType () const
void SetId (const ComponentId &id)
virtual ComponentValidationResult ValidateComponentRequirements (const ImmutableEntityVector &, const AZStd::unordered_set< AZ::Crc32 > &) const
bool SetConfiguration (const AZ::ComponentConfig &config)
bool GetConfiguration (AZ::ComponentConfig &outConfig) const

Additional Inherited Members

- Protected Member Functions inherited from AZ::Component
virtual bool ReadInConfig (const ComponentConfig *baseConfig)
virtual bool WriteOutConfig (ComponentConfig *outBaseConfig) const
void SetEntity (Entity *entity)
- Protected Attributes inherited from AZ::Component
 Reference to the entity that owns the component. The value is null if the component is not attached to an entity.
ComponentId m_id
 A component ID that is unique for an entity. This component ID is not unique across all entities.

Detailed Description

Memory manager component. It will manager all memory managers. This is the only component that requires special care as memory managers must be operational for any system to operate. In addition this component doesn't have a factory as it's managed by the bootstrap component class.

Member Function Documentation

◆ Activate()

void AZ::MemoryComponent::Activate ( )

Puts the component into an active state. The system calls this function once during activation of each entity that owns the component. You must override this function. The system calls a component's Activate() function only if all services and components that the component depends on are present and active. Use GetProvidedServices and GetDependentServices to specify these dependencies.

Implements AZ::Component.

◆ Deactivate()

void AZ::MemoryComponent::Deactivate ( )

Deactivates the component. The system calls this function when the owning entity is being deactivated. You must override this function. As a best practice, ensure that this function returns the component to a minimal footprint. The order of deactivation is the reverse of activation, so your component is deactivated before the components it depends on.

The system always calls the component's Deactivate() function before destroying the component. However, deactivation is not always followed by the destruction of the component. An entity and its components can be deactivated and reactivated without being destroyed. Ensure that your Deactivate() implementation can handle this scenario.

Implements AZ::Component.

◆ Init()

void AZ::MemoryComponent::Init ( )

Initializes a component's resources. (Optional) Override this function to initialize resources that the component needs. The system calls this function once for each entity that owns the component. Although the Init() function initializes the component, the component is not active until the system calls the component's Activate() function. We recommend that you minimize the component's CPU and memory overhead when the component is inactive.

Reimplemented from AZ::Component.

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