class ComponentMgr

Base class from which all component managers inherit.

File location: framework/cauldron/framework/inc/core/component.h

Construction

Return type

Description

ComponentMgr construction.

Methods

Return type

Description

Component *

SpawnComponent (Entity * pOwner, ComponentData * pData) = 0
Spawn’s a new component. Must be overridden by derived classes.

const wchar_t*

ComponentType () const = 0
Get the component type string representation.

uint32_t

Get the number of managed components.

Component *

GetComponent (const Entity * pEntity) const
Get the component associated with a specific “Entity“ instance.

const std::vector<Component *>&

Get the full list of managed components from this ComponentMgr.

void

ComponentMgr Initialization. Override as needed.

void

ComponentMgr Shutdown. Override as needed.

void

UpdateComponents (double deltaTime)
Updates all managed components. Override to {} when update support isn’t needed or to support other functionality.

void

Indicates the ComponentMgr should start managing the passed in “Component“.

void

Indicates the ComponentMgr should stop managing the passed in “Component“.

void

Focus lost.

void

Focus gained.

Detailed description

Base class from which all component managers inherit.

Construction

ComponentMgr

Copied!

ComponentMgr ()

ComponentMgr construction.


Methods

SpawnComponent

Copied!

virtual Component * SpawnComponent (Entity * pOwner, ComponentData * pData) = 0

Spawn’s a new component. Must be overridden by derived classes.


ComponentType

Copied!

virtual const wchar_t* ComponentType () const = 0

Get the component type string representation.


GetComponentCount

Copied!

uint32_t GetComponentCount () const

Get the number of managed components.


GetComponent

Copied!

Component * GetComponent (const Entity * pEntity) const

Get the component associated with a specific Entity instance.


GetComponentList

Copied!

const std::vector<Component *>& GetComponentList () const

Get the full list of managed components from this ComponentMgr.


Initialize

Copied!

virtual void Initialize ()

ComponentMgr Initialization. Override as needed.


Shutdown

Copied!

virtual void Shutdown ()

ComponentMgr Shutdown. Override as needed.


UpdateComponents

Copied!

virtual void UpdateComponents (double deltaTime)

Updates all managed components. Override to {} when update support isn’t needed or to support other functionality.


StartManagingComponent

Copied!

void StartManagingComponent (Component * pComponent)

Indicates the ComponentMgr should start managing the passed in Component.


StopManagingComponent

Copied!

void StopManagingComponent (Component * pComponent)

Indicates the ComponentMgr should stop managing the passed in Component.


OnFocusLost

Copied!

void OnFocusLost ()

Focus lost.


OnFocusGained

Copied!

void OnFocusGained ()

Focus gained.