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

removed metadata base class. removed nodata dependency to metadata (added by accident)

parent b06671b1
Branches armem/dev
No related tags found
1 merge request!330Rename time created
...@@ -9,25 +9,13 @@ ...@@ -9,25 +9,13 @@
namespace armarx::armem::base namespace armarx::armem::base
{ {
struct Metadata
{
virtual ~Metadata() = default;
/// TODO @peller
virtual void access() const = 0;
};
/** /**
* @brief Default data of an entity instance (empty). * @brief Default data of an entity instance (empty).
*/ */
struct NoData : public Metadata struct NoData
{ {
virtual ~NoData() = default; virtual ~NoData() = default;
void access() const final
{
}
bool operator==(const NoData& other) bool operator==(const NoData& other)
{ {
return true; return true;
...@@ -42,9 +30,11 @@ namespace armarx::armem::base ...@@ -42,9 +30,11 @@ namespace armarx::armem::base
/** /**
* @brief Metadata of an entity instance. * @brief Metadata of an entity instance.
*/ */
struct EntityInstanceMetadata : public Metadata struct EntityInstanceMetadata
{ {
///
virtual ~EntityInstanceMetadata() = default;
/** /**
* @brief Time this instance refers to. * @brief Time this instance refers to.
* *
...@@ -68,9 +58,8 @@ namespace armarx::armem::base ...@@ -68,9 +58,8 @@ namespace armarx::armem::base
/// A counter how often the instance has been accessed. /// A counter how often the instance has been accessed.
mutable unsigned long numAccessed = 0; mutable unsigned long numAccessed = 0;
virtual ~EntityInstanceMetadata() = default; /// Called whenever the entity instance this metadata belongs to is accessed (e.g. queried).
void access() const;
void access() const final;
bool operator==(const EntityInstanceMetadata& other) const; bool operator==(const EntityInstanceMetadata& other) const;
inline 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