ezEngine  Milestone 7
ezComponentManager< T, CompactStorage > Class Template Reference
Inheritance diagram for ezComponentManager< T, CompactStorage >:

Public Types

typedef T ComponentType
 

Public Member Functions

 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,
CompactStorage >::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.
 

Static Public Member Functions

static ezUInt16 TypeId ()
 Returns the type id corresponding to the component type managed by this manager.
 

Protected Member Functions

virtual void DeleteDeadComponent (ComponentStorageEntry storageEntry, ezComponent *&out_pMovedComponent) override
 
void RegisterUpdateFunction (UpdateFunctionDesc &desc)
 
- Protected Member Functions inherited from ezComponentManagerBase
 ezComponentManagerBase (ezWorld *pWorld)
 
void RegisterUpdateFunction (const UpdateFunctionDesc &desc)
 Registers the given update function at the world.
 
void DeregisterUpdateFunction (const UpdateFunctionDesc &desc)
 Deregisters the given update function from the world. Note that only the m_Function and the m_Phase of the description have to be valid for deregistration.
 
ezAllocatorBaseGetAllocator ()
 Returns the allocator used by the world.
 
ezInternal::WorldLargeBlockAllocatorGetBlockAllocator ()
 Returns the block allocator used by the world.
 

Protected Attributes

friend ComponentType
 
ezBlockStorage< ComponentType,
ezInternal::DEFAULT_BLOCK_SIZE,
CompactStorage > 
m_ComponentStorage
 
- Protected Attributes inherited from ezComponentManagerBase
ezIdTable
< ezGenericComponentId,
ComponentStorageEntry > 
m_Components
 

Additional Inherited Members

- 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.
 

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