MemoryItem.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
6
8{
9
10 /**
11 * @brief Base class of memory classes on different levels.
12 */
14 {
15 public:
16 MemoryItem();
17 explicit MemoryItem(const MemoryID& id);
18
19 MemoryItem(const MemoryItem& other) = default;
20 MemoryItem(MemoryItem&& other) = default;
21 MemoryItem& operator=(const MemoryItem& other) = default;
22 MemoryItem& operator=(MemoryItem&& other) = default;
23
24 inline MemoryID&
26 {
27 return _id;
28 }
29
30 inline const MemoryID&
31 id() const
32 {
33 return _id;
34 }
35
36
37 protected:
38 // Protected so we get a compile error if someone tries to destruct a MemoryItem
39 // instead of a derived type.
41
42
43 protected:
45 };
46
47} // namespace armarx::armem::base::detail
MemoryItem(const MemoryItem &other)=default
MemoryItem(MemoryItem &&other)=default
MemoryItem & operator=(MemoryItem &&other)=default
MemoryItem & operator=(const MemoryItem &other)=default