diff --git a/SDK/include/NDK/BaseComponent.hpp b/SDK/include/NDK/BaseComponent.hpp index 92b3b198b..53a6121ec 100644 --- a/SDK/include/NDK/BaseComponent.hpp +++ b/SDK/include/NDK/BaseComponent.hpp @@ -22,12 +22,17 @@ namespace Ndk using Factory = std::function; BaseComponent(ComponentIndex componentIndex); + BaseComponent(const BaseComponent&) = default; + BaseComponent(BaseComponent&&) noexcept = default; virtual ~BaseComponent(); virtual BaseComponent* Clone() const = 0; ComponentIndex GetIndex() const; + BaseComponent& operator=(const BaseComponent&) = default; + BaseComponent& operator=(BaseComponent&&) noexcept = default; + protected: ComponentIndex m_componentIndex; diff --git a/SDK/include/NDK/BaseSystem.hpp b/SDK/include/NDK/BaseSystem.hpp index ee03bf1f2..9204f0fe0 100644 --- a/SDK/include/NDK/BaseSystem.hpp +++ b/SDK/include/NDK/BaseSystem.hpp @@ -23,7 +23,9 @@ namespace Ndk public: BaseSystem(SystemIndex systemId); - virtual ~BaseSystem(); + BaseSystem(const BaseSystem&); + BaseSystem(BaseSystem&&) noexcept = default; + ~BaseSystem(); virtual BaseSystem* Clone() const = 0; @@ -35,6 +37,9 @@ namespace Ndk bool HasEntity(const Entity* entity) const; + BaseSystem& operator=(const BaseSystem&) = delete; + BaseSystem& operator=(BaseSystem&&) noexcept = default; + protected: template void Excludes(); template void Excludes(); diff --git a/SDK/include/NDK/BaseSystem.inl b/SDK/include/NDK/BaseSystem.inl index 95a091b83..7c688138b 100644 --- a/SDK/include/NDK/BaseSystem.inl +++ b/SDK/include/NDK/BaseSystem.inl @@ -12,6 +12,13 @@ namespace Ndk { } + inline BaseSystem::BaseSystem(const BaseSystem& system) : + m_excludedComponents(system.m_excludedComponents), + m_requiredComponents(system.m_requiredComponents), + m_systemIndex(system.m_systemIndex) + { + } + inline const std::vector& BaseSystem::GetEntities() const { return m_entities; diff --git a/SDK/include/NDK/System.hpp b/SDK/include/NDK/System.hpp index 91774fead..6d1d423dc 100644 --- a/SDK/include/NDK/System.hpp +++ b/SDK/include/NDK/System.hpp @@ -16,10 +16,15 @@ namespace Ndk { public: System(); + System(const System&) = default; + System(System&&) = default; virtual ~System(); BaseSystem* Clone() const override; + System& operator=(const System&) = delete; + System& operator=(System&&) = default; + static SystemIndex RegisterSystem(); }; } diff --git a/SDK/include/NDK/System.inl b/SDK/include/NDK/System.inl index 98b5f06da..c7bfdf401 100644 --- a/SDK/include/NDK/System.inl +++ b/SDK/include/NDK/System.inl @@ -30,5 +30,4 @@ namespace Ndk { return GetNextIndex(); } - }