diff --git a/source/RobotAPI/libraries/armem/core/base/EntityInstanceBase.h b/source/RobotAPI/libraries/armem/core/base/EntityInstanceBase.h index 26806524c61fe00b14ba8cab2c9cdf795f89b91d..c756b9959a6d43657c331181de1643c8df06f71d 100644 --- a/source/RobotAPI/libraries/armem/core/base/EntityInstanceBase.h +++ b/source/RobotAPI/libraries/armem/core/base/EntityInstanceBase.h @@ -11,9 +11,9 @@ namespace armarx::armem::base struct Metadata { - virtual void access() const = 0; - virtual ~Metadata() = default; + + virtual void access() const = 0; }; /** @@ -21,12 +21,20 @@ namespace armarx::armem::base */ struct NoData : public Metadata { - void access() const final {} - virtual ~NoData() = default; - bool operator==(const NoData& other) { return true; } - bool operator!=(const NoData& other) { return false;} + void access() const final + { + } + + bool operator==(const NoData& other) + { + return true; + } + bool operator!=(const NoData& other) + { + return false; + } }; @@ -35,8 +43,16 @@ namespace armarx::armem::base */ struct EntityInstanceMetadata : public Metadata { - /// Time when this value was created. + /// + /** + * @brief Time this instance refers to. + * + * For example, the physical time point when an image was captured. + * If the image is processed, the result should have the same + * referencedTime as the image. + */ Time referencedTime = Time::Invalid(); + /// Time when this value was sent to the memory. Time sentTime = Time::Invalid(); /// Time when this value has arrived at the memory. @@ -51,10 +67,10 @@ namespace armarx::armem::base /// A counter how often the instance has been accessed mutable unsigned long accessed = 0; - void access() const final; - virtual ~EntityInstanceMetadata() = default; + void access() const final; + bool operator==(const EntityInstanceMetadata& other) const; inline bool operator!=(const EntityInstanceMetadata& other) const {