memory_definitions.h
Go to the documentation of this file.
1#pragma once
2
10
12
13namespace armarx::armem::wm
14{
15 /**
16 * @brief Client-side working memory entity instance metadata.
17 */
19 /**
20 * @brief Client-side working memory entity instance data (payload).
21 */
23 /**
24 * @brief Pointer type of EntityInstanceData.
25 */
27
28 /**
29 * @brief Client-side working entity instance.
30 * @see base::EntityInstanceBase
31 */
33 public base::EntityInstanceBase<EntityInstanceDataPtr, EntityInstanceMetadata>
34 {
36
37 public:
39
40 /**
41 * @brief Fill `*this` with the update's values.
42 * @param update The update.
43 * @param index The instances index.
44 */
45 void update(const EntityUpdate& update);
46
47 bool equalsDeep(const EntityInstance& other) const;
48 };
49
50 /**
51 * @brief Entity instance with a concrete ARON DTO type as data.
52 *
53 * This is the return type of EntityInstance::withDataAs<AronDtoT>().
54 *
55 * Usage example:
56 * @code
57 * #include <RobotAPI/libraries/aron/common/aron/time.aron.generated.h>
58 *
59 * armarx::arondto::Duration duration;
60 * duration.microSeconds = 1000;
61 *
62 * armarx::armem::wm::EntityInstance instance;
63 * instance.data() = duration.toAron();
64 *
65 * const armarx::armem::wm::EntityInstanceBase<armarx::arondto::Duration> cast =
66 * instance.withDataAs<armarx::arondto::Duration>();
67 *
68 * const armarx::arondto::Duration& durationOut = cast.data();
69 *
70 * assert(durationOut.microseconds == 1000);
71 * @endcode
72 */
73 template <class AronDtoT>
75
76 /**
77 * @brief Client-side working memory entity snapshot.
78 * @see base::EntitySnapshotBase
79 */
81 public base::EntitySnapshotBase<EntityInstance, EntitySnapshot>,
82 public detail::FindInstanceDataMixinForSnapshot<EntitySnapshot>
83
84 {
85 public:
87 };
88
89 /**
90 * @brief Client-side working memory entity.
91 * @see base::EntityBase
92 */
93 class Entity :
94 public base::EntityBase<EntitySnapshot, Entity>,
96 {
97 public:
99 };
100
101 /**
102 * @brief Client-side working memory provider segment.
103 * @see base::ProviderSegmentBase
104 */
106 public base::ProviderSegmentBase<Entity, ProviderSegment>,
107 public detail::FindInstanceDataMixin<ProviderSegment>
108 {
110
111 public:
113 };
114
115 /**
116 * @brief Client-side working memory core segment.
117 * @see base::CoreSegmentBase
118 */
120 public base::CoreSegmentBase<ProviderSegment, CoreSegment>,
121 public detail::FindInstanceDataMixin<CoreSegment>
122 {
124
125 public:
127 };
128
129 /**
130 * @brief Client-side working memory.
131 * @see base::MemoryBase
132 */
133 class Memory :
134 public base::MemoryBase<CoreSegment, Memory>,
135 public detail::FindInstanceDataMixin<Memory>
136 {
138
139 public:
140 using Base::MemoryBase;
141 };
142
143} // namespace armarx::armem::wm
Data of a core segment containing multiple provider segments.
An entity over a period of time.
Definition EntityBase.h:49
Data of a single entity instance.
Data of an entity at one point in time.
Data of a memory consisting of multiple core segments.
Definition MemoryBase.h:30
Data of a provider segment containing multiple entities.
Client-side working memory core segment.
Client-side working entity instance.
bool equalsDeep(const EntityInstance &other) const
void update(const EntityUpdate &update)
Fill *this with the update's values.
Client-side working memory entity snapshot.
Client-side working memory entity.
Client-side working memory.
Client-side working memory provider segment.
base::EntityInstanceMetadata EntityInstanceMetadata
Client-side working memory entity instance metadata.
base::EntityInstanceBase< AronDtoT, EntityInstanceMetadata > EntityInstanceBase
Entity instance with a concrete ARON DTO type as data.
armarx::aron::data::Dict EntityInstanceData
Client-side working memory entity instance data (payload).
armarx::aron::data::DictPtr EntityInstanceDataPtr
Pointer type of EntityInstanceData.
std::shared_ptr< Dict > DictPtr
Definition Dict.h:42
An update of an entity for a specific point in time.
Definition Commit.h:26