Skip to content
Snippets Groups Projects
Commit 380f8c54 authored by Fabian Tërnava's avatar Fabian Tërnava
Browse files

merge

parent 0658d898
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment