From 380f8c54de735a3cb2b318259b9f3d6295a98807 Mon Sep 17 00:00:00 2001
From: Fabian Peller <fabian.peller-konrad@kit.edu>
Date: Mon, 27 Mar 2023 18:16:42 +0200
Subject: [PATCH] merge

---
 .../armem/core/base/EntityInstanceBase.h      | 26 +++++--------------
 1 file changed, 6 insertions(+), 20 deletions(-)

diff --git a/source/RobotAPI/libraries/armem/core/base/EntityInstanceBase.h b/source/RobotAPI/libraries/armem/core/base/EntityInstanceBase.h
index f7e5396bd..2dadcbc67 100644
--- a/source/RobotAPI/libraries/armem/core/base/EntityInstanceBase.h
+++ b/source/RobotAPI/libraries/armem/core/base/EntityInstanceBase.h
@@ -9,25 +9,13 @@
 namespace armarx::armem::base
 {
 
-    struct Metadata
-    {
-        virtual ~Metadata() = default;
-
-        /// TODO @peller
-        virtual void access() const = 0;
-    };
-
     /**
      * @brief Default data of an entity instance (empty).
      */
-    struct NoData : public Metadata
+    struct NoData
     {
         virtual ~NoData() = default;
 
-        void access() const final
-        {
-        }
-
         bool operator==(const NoData& other)
         {
             return true;
@@ -42,10 +30,10 @@ namespace armarx::armem::base
     /**
      * @brief Metadata of an entity instance.
      */
-    struct EntityInstanceMetadata : public Metadata
+    struct EntityInstanceMetadata
     {
-	/// Time when this value was created.
-        Time createdTime;
+
+        virtual ~EntityInstanceMetadata() = default;
 
         /**
          * @brief Time this instance refers to.
@@ -58,7 +46,6 @@ namespace armarx::armem::base
 
         /// Time when this value was sent to the memory.
         Time sentTime = Time::Invalid();
-
         /// Time when this value has arrived at the memory.
         Time arrivedTime = Time::Invalid();
 
@@ -71,9 +58,8 @@ namespace armarx::armem::base
         /// A counter how often the instance has been accessed.
         mutable unsigned long numAccessed = 0;
 
-        virtual ~EntityInstanceMetadata() = default;
-
-        void access() const final;
+        /// Called whenever the entity instance this metadata belongs to is accessed (e.g. queried).
+        void access() const;
 
         bool operator==(const EntityInstanceMetadata& other) const;
         inline bool operator!=(const EntityInstanceMetadata& other) const
-- 
GitLab