Sdk/BaseComponent: Disable implicit copying

This commit is contained in:
Lynix 2017-05-11 21:21:25 +02:00
parent dd4466081f
commit c9969d1b57
1 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,6 @@ namespace Ndk
using Factory = std::function<BaseComponent*()>;
BaseComponent(ComponentIndex componentIndex);
BaseComponent(const BaseComponent&) = default;
BaseComponent(BaseComponent&&) = default;
virtual ~BaseComponent();
@ -34,7 +33,7 @@ namespace Ndk
inline static ComponentIndex GetMaxComponentIndex();
BaseComponent& operator=(const BaseComponent&) = default;
BaseComponent& operator=(const BaseComponent&) = delete;
BaseComponent& operator=(BaseComponent&&) = default;
protected:
@ -44,6 +43,8 @@ namespace Ndk
static ComponentIndex RegisterComponent(ComponentId id, Factory factoryFunc);
private:
BaseComponent(const BaseComponent&) = default;
virtual void OnAttached();
virtual void OnComponentAttached(BaseComponent& component);
virtual void OnComponentDetached(BaseComponent& component);