ezEngine  Milestone 7
ezComponentManagerSimple< ComponentType > Class Template Reference

Simple component manager implementation that calls an update method on all components every frame. More...

#include <ComponentManager.h>

Inheritance diagram for ezComponentManagerSimple< ComponentType >:

Public Member Functions

 ezComponentManagerSimple (ezWorld *pWorld)
 
virtual ezResult Initialize () override
 This method is called after the constructor. A derived type can override this method to do initialization work. Typically this is the method where updates function are registered.
 
void SimpleUpdate (ezUInt32 uiStartIndex, ezUInt32 uiCount)
 A simple update function that iterates over all components and calls Update() on every component.
 
- Public Member Functions inherited from ezComponentManager< ComponentType >
 ezComponentManager (ezWorld *pWorld)
 Although the constructor is public always use ezWorld::CreateComponentManager to create an instance.
 
virtual ezComponentHandle CreateComponent () override
 Create a new component instance and returns a handle to it.
 
ezComponentHandle CreateComponent (ComponentType *&out_pComponent)
 Create a new component instance and returns a handle to it and writes a pointer to out_pComponent.
 
bool TryGetComponent (const ezComponentHandle &component, ComponentType *&out_pComponent) const
 Returns if a component with the given handle exists and if so writes out the corresponding pointer to out_pComponent.
 
ezBlockStorage< ComponentType,
ezInternal::DEFAULT_BLOCK_SIZE,
false >::Iterator 
GetComponents ()
 Returns an iterator over all components.
 
virtual const ezRTTIGetComponentType () const override
 Returns the rtti info of the component type that this manager handles.
 
- Public Member Functions inherited from ezComponentManagerBase
ezWorldGetWorld () const
 Returns the corresponding world to this manager.
 
bool IsValidComponent (const ezComponentHandle &component) const
 Checks whether the given handle references a valid component.
 
bool TryGetComponent (const ezComponentHandle &component, ezComponent *&out_pComponent) const
 Returns if a component with the given handle exists and if so writes out the corresponding pointer to out_pComponent.
 
ezUInt32 GetComponentCount () const
 Returns the number of components managed by this manager.
 
void DeleteComponent (const ezComponentHandle &component)
 Deletes the given component. Note that the component will be invalidated first and the actual deletion is postponed.
 

Additional Inherited Members

- Public Types inherited from ezComponentManager< ComponentType >
typedef ComponentType ComponentType
 
- Static Public Member Functions inherited from ezComponentManager< ComponentType >
static ezUInt16 TypeId ()
 Returns the type id corresponding to the component type managed by this manager.
 
- Protected Types inherited from ezComponentManagerBase
typedef ezDelegate< void(ezUInt32,
ezUInt32)> 
UpdateFunction
 Update function delegate. The first parameter is the first index to the components that should be updated. The second parameter is the number of components that should be updated.
 
- Protected Member Functions inherited from ezComponentManager< ComponentType >
virtual void DeleteDeadComponent (ComponentStorageEntry storageEntry, ezComponent *&out_pMovedComponent) override
 
void RegisterUpdateFunction (UpdateFunctionDesc &desc)
 
- Protected Attributes inherited from ezComponentManager< ComponentType >
friend ComponentType
 
ezBlockStorage< ComponentType,
ezInternal::DEFAULT_BLOCK_SIZE,
false > 
m_ComponentStorage
 

Detailed Description

template<typename ComponentType>
class ezComponentManagerSimple< ComponentType >

Simple component manager implementation that calls an update method on all components every frame.


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