memory_definitions.cpp
Go to the documentation of this file.
2
3#include <map>
4#include <vector>
5
7
9
10#include "error.h"
11
12namespace armarx::armem::wm
13{
14
15 bool
17 {
18 if (_data and other.data())
19 {
20 return id() == other.id() && _metadata == other.metadata() && *_data == *other.data();
21 }
22 if (_data or other.data())
23 {
24 return false;
25 }
26 return id() == other.id() && _metadata == other.metadata();
27 }
28
29 void
31 {
32 ARMARX_CHECK_FITS_SIZE(this->index(), update.instancesData.size());
33
34 this->data() = update.instancesData.at(size_t(this->index()));
35
36 this->_metadata.confidence = update.confidence;
37
38 this->_metadata.referencedTime = update.referencedTime;
39 this->_metadata.sentTime = update.sentTime;
40 this->_metadata.arrivedTime = update.arrivedTime;
41 this->_metadata.origin = update.origin;
42 }
43
44} // namespace armarx::armem::wm
Client-side working entity instance.
bool equalsDeep(const EntityInstance &other) const
void update(const EntityUpdate &update)
Fill *this with the update's values.
#define ARMARX_CHECK_FITS_SIZE(number, size)
Check whether number is nonnegative (>= 0) and less than size.
An update of an entity for a specific point in time.
Definition Commit.h:26
std::vector< aron::data::DictPtr > instancesData
The entity data.
Definition Commit.h:31