diff --git a/source/RobotAPI/libraries/armem/core/base/EntityBase.h b/source/RobotAPI/libraries/armem/core/base/EntityBase.h index 90cd503a1c5763d24ae5d72bff891c943b76bef9..6d2a3a8ded0b9c53d87703a7ed377438493ff4ce 100644 --- a/source/RobotAPI/libraries/armem/core/base/EntityBase.h +++ b/source/RobotAPI/libraries/armem/core/base/EntityBase.h @@ -67,19 +67,11 @@ namespace armarx::armem::base { } - /* - EntityBase(const EntityBase& other) : - Base(other) - { - } - - EntityBase& operator=(const EntityBase& other) - { - other._copySelf(*this); - return *this; - } - */ + EntityBase(const EntityBase& other) = default; + EntityBase(EntityBase&& other) = default; + EntityBase& operator=(const EntityBase& other) = default; + EntityBase& operator=(EntityBase&& other) = default; virtual bool equalsDeep(const EntityBase& other) const diff --git a/source/RobotAPI/libraries/armem/core/diskmemory/Entity.cpp b/source/RobotAPI/libraries/armem/core/diskmemory/Entity.cpp index bf14fe6464532ad02857696ac8fe2c31e9aaaed9..a616914ede5c279d11daea7afcfe81a681b0c460 100644 --- a/source/RobotAPI/libraries/armem/core/diskmemory/Entity.cpp +++ b/source/RobotAPI/libraries/armem/core/diskmemory/Entity.cpp @@ -2,19 +2,6 @@ namespace armarx::armem::d_ltm { - - Entity::Entity(const Entity& other) : - Base(other), - path(other.path) - { - } - - Entity& Entity::operator=(const Entity& other) - { - other._copySelf(*this); - return *this; - } - std::filesystem::path Entity::_fullPath() const { if (path) diff --git a/source/RobotAPI/libraries/armem/core/diskmemory/Entity.h b/source/RobotAPI/libraries/armem/core/diskmemory/Entity.h index 9174ffb73d326ec947ac7c8265f26b12b07805bc..35022275570c93378cbe0c767aad1776da594838 100644 --- a/source/RobotAPI/libraries/armem/core/diskmemory/Entity.h +++ b/source/RobotAPI/libraries/armem/core/diskmemory/Entity.h @@ -38,9 +38,8 @@ namespace armarx::armem::d_ltm public: using Base::EntityBase; + using Base::operator=; - Entity(const Entity& other); - Entity& operator=(const Entity& other); // Conversion wm::Entity convert(const aron::typenavigator::NavigatorPtr& expectedStructure) const; diff --git a/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.cpp b/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.cpp index 92eb8e29be2d6a74303534b4ed3f825f3ba183a6..15e232c01fb0edb2ce6e0bffec0f2f0b2c0a3110 100644 --- a/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.cpp +++ b/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.cpp @@ -3,12 +3,6 @@ namespace armarx::armem::ltm { - Entity& Entity::operator=(const Entity& other) - { - other._copySelf(*this); - return *this; - } - wm::Entity Entity::convert() const { wm::Entity m; diff --git a/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.h b/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.h index 7bce33fe15f5a012313105a3f39a7fade99cacb7..ecdf297c13fae4d24b070f2af13fd6c84ed93392 100644 --- a/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.h +++ b/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.h @@ -36,9 +36,8 @@ namespace armarx::armem::ltm public: using Base::EntityBase; + using Base::operator=; - /// Copy the history from `other` to this. - Entity& operator=(const Entity& other); // Conversion wm::Entity convert() const; diff --git a/source/RobotAPI/libraries/armem/core/workingmemory/Entity.cpp b/source/RobotAPI/libraries/armem/core/workingmemory/Entity.cpp index 6d129eaa2f06df4ed53341bd8de6cc082d56f9f6..022864c19d9ea98583d9d3998bec46643921cdc8 100644 --- a/source/RobotAPI/libraries/armem/core/workingmemory/Entity.cpp +++ b/source/RobotAPI/libraries/armem/core/workingmemory/Entity.cpp @@ -2,15 +2,6 @@ namespace armarx::armem::wm { - - /* - Entity& Entity::operator=(const Entity& other) - { - other._copySelf(*this); - return *this; - } - */ - void Entity::_copySelfWithoutData(Entity& other) const { other.id() = _id; diff --git a/source/RobotAPI/libraries/armem/core/workingmemory/Entity.h b/source/RobotAPI/libraries/armem/core/workingmemory/Entity.h index a0c14ed9c7ea86a5b3697d0a303d244526f091e2..6a31286722e0e78d53423f6aa6b517583f83ca09 100644 --- a/source/RobotAPI/libraries/armem/core/workingmemory/Entity.h +++ b/source/RobotAPI/libraries/armem/core/workingmemory/Entity.h @@ -36,9 +36,13 @@ namespace armarx::armem::wm public: using Base::EntityBase; - virtual ~Entity() override = default; - //Entity& operator=(const Entity& other); + Entity(const Entity& other) = default; + Entity(Entity&& other) = default; + Entity& operator=(const Entity& other) = default; + Entity& operator=(Entity&& other) = default; + + virtual ~Entity() override = default; protected: