Sdk/BaseComponent: Disable implicit copying
This commit is contained in:
parent
dd4466081f
commit
c9969d1b57
|
|
@ -23,7 +23,6 @@ namespace Ndk
|
||||||
using Factory = std::function<BaseComponent*()>;
|
using Factory = std::function<BaseComponent*()>;
|
||||||
|
|
||||||
BaseComponent(ComponentIndex componentIndex);
|
BaseComponent(ComponentIndex componentIndex);
|
||||||
BaseComponent(const BaseComponent&) = default;
|
|
||||||
BaseComponent(BaseComponent&&) = default;
|
BaseComponent(BaseComponent&&) = default;
|
||||||
virtual ~BaseComponent();
|
virtual ~BaseComponent();
|
||||||
|
|
||||||
|
|
@ -34,7 +33,7 @@ namespace Ndk
|
||||||
|
|
||||||
inline static ComponentIndex GetMaxComponentIndex();
|
inline static ComponentIndex GetMaxComponentIndex();
|
||||||
|
|
||||||
BaseComponent& operator=(const BaseComponent&) = default;
|
BaseComponent& operator=(const BaseComponent&) = delete;
|
||||||
BaseComponent& operator=(BaseComponent&&) = default;
|
BaseComponent& operator=(BaseComponent&&) = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -44,6 +43,8 @@ namespace Ndk
|
||||||
static ComponentIndex RegisterComponent(ComponentId id, Factory factoryFunc);
|
static ComponentIndex RegisterComponent(ComponentId id, Factory factoryFunc);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
BaseComponent(const BaseComponent&) = default;
|
||||||
|
|
||||||
virtual void OnAttached();
|
virtual void OnAttached();
|
||||||
virtual void OnComponentAttached(BaseComponent& component);
|
virtual void OnComponentAttached(BaseComponent& component);
|
||||||
virtual void OnComponentDetached(BaseComponent& component);
|
virtual void OnComponentDetached(BaseComponent& component);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue