Plasma Engine  2.0
Loading...
Searching...
No Matches
SettingsComponentManager.h
1#pragma once
2
3#include <Core/World/ComponentManager.h>
4#include <Foundation/Types/UniquePtr.h>
5
12template <typename ComponentType>
14{
15 PL_DISALLOW_COPY_AND_ASSIGN(plSettingsComponentManager);
16
17public:
20
22 ComponentType* GetSingletonComponent();
23 const ComponentType* GetSingletonComponent() const;
24
25 static plWorldModuleTypeId TypeId();
26
27 // plComponentManagerBase implementation
28 virtual void CollectAllComponents(plDynamicArray<plComponentHandle>& out_allComponents, bool bOnlyActive) override;
29 virtual void CollectAllComponents(plDynamicArray<plComponent*>& out_allComponents, bool bOnlyActive) override;
30
31private:
32 friend class plComponentManagerFactory;
33
34 virtual plComponent* CreateComponentStorage() override;
35 virtual void DeleteComponentStorage(plComponent* pComponent, plComponent*& out_pMovedComponent) override;
36
38};
39
40#include <Core/World/Implementation/SettingsComponentManager_inl.h>
Base class of all component types.
Definition Component.h:25
Base class for all component managers. Do not derive directly from this class, but derive from plComp...
Definition ComponentManager.h:21
Definition DynamicArray.h:81
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
A component manager that does no update at all on components and expects only a single instance to be...
Definition SettingsComponentManager.h:14
virtual void CollectAllComponents(plDynamicArray< plComponentHandle > &out_allComponents, bool bOnlyActive) override
Adds all components that this manager handles to the given array (array is not cleared)....
Definition SettingsComponentManager_inl.h:51
ComponentType * GetSingletonComponent()
Returns the first component of this type that has been created.
Definition SettingsComponentManager_inl.h:18
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22