CoreSegmentBase.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <string>
5 
7 
8 #include "ProviderSegmentBase.h"
9 #include "detail/AronTyped.h"
11 #include "detail/Predictive.h"
13 #include "detail/lookup_mixins.h"
14 
16 {
17 
18  /**
19  * @brief Data of a core segment containing multiple provider segments.
20  */
21  template <class _ProviderSegmentT, class _Derived>
23  public detail::MemoryContainerBase<std::map<std::string, _ProviderSegmentT>, _Derived>,
24  public detail::AronTyped,
25  public detail::PredictiveContainer<_Derived>,
26  public detail::ForEachEntityInstanceMixin<_Derived>,
27  public detail::ForEachEntitySnapshotMixin<_Derived>,
28  public detail::ForEachEntityMixin<_Derived>,
29  public detail::GetFindInstanceMixin<_Derived>,
30  public detail::GetFindSnapshotMixin<_Derived>,
31  public detail::GetFindEntityMixin<_Derived>
32  {
33  using Base =
35 
36  public:
37  using typename Base::ContainerT;
38  using typename Base::DerivedT;
39 
40  using ProviderSegmentT = _ProviderSegmentT;
41  using EntityT = typename ProviderSegmentT::EntityT;
42  using EntitySnapshotT = typename EntityT::EntitySnapshotT;
43  using EntityInstanceT = typename EntitySnapshotT::EntityInstanceT;
44 
46 
47  struct UpdateResult
48  {
53  std::vector<EntitySnapshotT> removedSnapshots;
54 
55  UpdateResult() = default;
56 
57  UpdateResult(const typename ProviderSegmentT::UpdateResult& c) :
60  id(c.id),
62  {
63  }
64  };
65 
66 
67  public:
69  {
70  }
71 
72  explicit CoreSegmentBase(const std::string& name,
74  const std::vector<PredictionEngine>& predictionEngines = {}) :
76  {
77  }
78 
79  explicit CoreSegmentBase(const std::string& name,
80  const MemoryID& parentID,
82  const std::vector<PredictionEngine>& predictionEngines = {}) :
84  {
85  }
86 
87  explicit CoreSegmentBase(const MemoryID& id,
89  const std::vector<PredictionEngine>& predictionEngines = {}) :
91  {
92  }
93 
94  CoreSegmentBase(const CoreSegmentBase& other) = default;
95  CoreSegmentBase(CoreSegmentBase&& other) = default;
96  CoreSegmentBase& operator=(const CoreSegmentBase& other) = default;
97  CoreSegmentBase& operator=(CoreSegmentBase&& other) = default;
98 
99  // READ ACCESS
100 
101  // Get key
102  inline std::string&
104  {
105  return this->id().coreSegmentName;
106  }
107 
108  inline const std::string&
109  name() const
110  {
111  return this->id().coreSegmentName;
112  }
113 
114  // Has child by key
115  bool
116  hasProviderSegment(const std::string& name) const
117  {
118  return this->findProviderSegment(name) != nullptr;
119  }
120 
121  // Has child by memory ID
122  bool
123  hasProviderSegment(const MemoryID& providerSegmentID) const
124  {
125  return this->findProviderSegment(providerSegmentID) != nullptr;
126  }
127 
128  // Find child by key
130  findProviderSegment(const std::string& name)
131  {
132  return detail::findChildByKey(name, this->_container);
133  }
134 
135  const ProviderSegmentT*
136  findProviderSegment(const std::string& name) const
137  {
138  return detail::findChildByKey(name, this->_container);
139  }
140 
141  // Get child by key
143  getProviderSegment(const std::string& name)
144  {
145  return detail::getChildByKey(name, this->_container, *this);
146  }
147 
148  const ProviderSegmentT&
149  getProviderSegment(const std::string& name) const
150  {
151  return detail::getChildByKey(name, this->_container, *this);
152  }
153 
154  // Find child by MemoryID
156  findProviderSegment(const MemoryID& providerSegmentID)
157  {
158  detail::checkHasProviderSegmentName(providerSegmentID);
159  return this->findProviderSegment(providerSegmentID.providerSegmentName);
160  }
161 
162  const ProviderSegmentT*
163  findProviderSegment(const MemoryID& providerSegmentID) const
164  {
165  detail::checkHasProviderSegmentName(providerSegmentID);
166  return this->findProviderSegment(providerSegmentID.providerSegmentName);
167  }
168 
169  // Get child by MemoryID
171  getProviderSegment(const MemoryID& providerSegmentID)
172  {
173  detail::checkHasProviderSegmentName(providerSegmentID);
174  return this->getProviderSegment(providerSegmentID.providerSegmentName);
175  }
176 
177  const ProviderSegmentT&
178  getProviderSegment(const MemoryID& providerSegmentID) const
179  {
180  detail::checkHasProviderSegmentName(providerSegmentID);
181  return this->getProviderSegment(providerSegmentID.providerSegmentName);
182  }
183 
184  // get/findInstance are provided by GetFindInstanceMixin
185  // get/findSnapshot are provided by GetFindSnapshotMixin
186  // get/findEntity are provided by GetFindEntityMixin
189 
190  // Search all provider segments for the first matching entity.
191 
192  bool
193  hasEntity(const std::string& entityName) const
194  {
195  return this->findEntity(entityName) != nullptr;
196  }
197 
198  EntityT*
199  findEntity(const std::string& entityName)
200  {
201  return _findEntity(*this, entityName);
202  }
203 
204  const EntityT*
205  findEntity(const std::string& entityName) const
206  {
207  return _findEntity(*this, entityName);
208  }
209 
210  // ITERATION
211 
212  /**
213  * @param func Function like: bool process(ProviderSegmentT& provSeg)
214  */
215  template <class ProviderSegmentFunctionT>
216  bool
217  forEachProviderSegment(ProviderSegmentFunctionT&& func)
218  {
219  return this->forEachChild(func);
220  }
221 
222  /**
223  * @param func Function like: bool process(const ProviderSegmentT& provSeg)
224  */
225  template <class ProviderSegmentFunctionT>
226  bool
227  forEachProviderSegment(ProviderSegmentFunctionT&& func) const
228  {
229  return this->forEachChild(func);
230  }
231 
232  // forEachEntity() is provided by ForEachEntityMixin.
233  // forEachSnapshot() is provided by ForEachEntitySnapshotMixin.
234  // forEachInstance() is provided by ForEachEntityInstanceMixin.
235 
236 
237  /**
238  * @param func Function like void process(EntityInstanceT& instance)>
239  */
240  template <class InstanceFunctionT>
241  bool
242  forEachInstanceIn(const MemoryID& id, InstanceFunctionT&& func)
243  {
244  return detail::forEachInstanceIn(id,
245  func,
246  *this,
247  id.hasProviderSegmentName(),
248  id.hasProviderSegmentName()
249  ? this->findProviderSegment(id.providerSegmentName)
250  : nullptr);
251  }
252 
253  /**
254  * @param func Function like void process(EntityInstanceT& instance)>
255  */
256  template <class InstanceFunctionT>
257  bool
258  forEachInstanceIn(const MemoryID& id, InstanceFunctionT&& func) const
259  {
260  return detail::forEachInstanceIn(id,
261  func,
262  *this,
263  id.hasProviderSegmentName(),
264  id.hasProviderSegmentName()
265  ? this->findProviderSegment(id.providerSegmentName)
266  : nullptr);
267  }
268 
269  // Get child keys
270  std::vector<std::string>
272  {
273  return simox::alg::get_keys(this->_container);
274  }
275 
276  // MODIFICATION
277 
278  /**
279  * @brief Updates an entity's history.
280  *
281  * Missing entity entries are added before updating.
282  */
283  UpdateResult
285  {
286  this->_checkContainerName(update.entityID.coreSegmentName, this->name());
287 
288  auto [inserted, provSeg] =
289  _addProviderSegmentIfMissing(update.entityID.providerSegmentName);
290 
291 
292  // Update entry.
293  UpdateResult ret(provSeg->update(update));
294  if (inserted)
295  {
296  ret.coreSegmentUpdateType = UpdateType::InsertedNew;
297  }
298  else
299  {
300  ret.coreSegmentUpdateType = UpdateType::UpdatedExisting;
301  }
302  return ret;
303  }
304 
305  template <class OtherDerivedT>
306  void
307  append(const OtherDerivedT& other)
308  {
309  other.forEachProviderSegment(
310  [this](const auto& provSeg)
311  {
312  auto it = this->_container.find(provSeg.name());
313  if (it == this->_container.end())
314  {
315  it = this->_container
316  .emplace(provSeg.name(),
317  this->id().withProviderSegmentName(provSeg.name()))
318  .first;
319  it->second.aronType() = provSeg.aronType();
320  }
321 
322  /*TODO: if (it->second.aronType() != provSeg.aronType())
323  {
324  ARMARX_WARNING
325  << "When appending a coreseg to another coreseg type conflicts have "
326  "been found. Setting the type to NULL...";
327  it->second.aronType() = nullptr;
328  }*/
329 
330  it->second.append(provSeg);
331  return true;
332  });
333  }
334 
335  /**
336  * @brief Add an empty provider segment with the given name,
337  * optional provider segment type and prediction engines.
338  * @param name The segment name.
339  * @param providerSegmentType The provider type. If nullptr, the core segment type is used.
340  * @param predictionEngines The prediction engines supported by the provider segment (optional).
341  * @return The added provider segment.
342  */
344  addProviderSegment(const std::string& name,
345  aron::type::ObjectPtr providerSegmentType = nullptr,
346  const std::vector<PredictionEngine>& predictionEngines = {})
347  {
348  aron::type::ObjectPtr type =
349  providerSegmentType ? providerSegmentType : this->aronType();
350  return this->_derived().addProviderSegment(name, name, type, predictionEngines);
351  }
352 
353  /// Copy and insert a provider segment.
355  addProviderSegment(const ProviderSegmentT& providerSegment)
356  {
357  return this->_derived().addProviderSegment(providerSegment.name(),
358  ProviderSegmentT(providerSegment));
359  }
360 
361  /// Move and insert a provider segment.
364  {
365  const std::string name = providerSegment.name(); // Copy before move.
366  return this->_derived().addProviderSegment(name, std::move(providerSegment));
367  }
368 
369  /// Insert a provider segment in-place.
370  template <class... Args>
372  addProviderSegment(const std::string& name, Args... args)
373  {
374  ChildT& child = this->template _addChild<ChildT>(name, args...);
375  child.id() = this->id().withProviderSegmentName(name);
376  return child;
377  }
378 
379  // MISC
380 
381  bool
382  equalsDeep(const DerivedT& other) const
383  {
384  //std::cout << "CoreSegment::equalsDeep" << std::endl;
385  if (this->size() != other.size())
386  {
387  return false;
388  }
389  for (const auto& [key, provider] : this->_container)
390  {
391  if (not other.hasProviderSegment(key))
392  {
393  return false;
394  }
395  if (not provider.equalsDeep(other.getProviderSegment(key)))
396  {
397  return false;
398  }
399  }
400  return true;
401  }
402 
403  static std::string
405  {
406  return "core segment";
407  }
408 
409  std::string
410  getKeyString() const
411  {
412  return this->name();
413  }
414 
415 
416  protected:
417  template <class ParentT>
418  static auto*
419  _findEntity(ParentT&& parent, const std::string& entityName)
420  {
421  decltype(parent.findEntity(entityName)) result = nullptr;
422  parent.forEachProviderSegment(
423  [&result, &entityName](auto& provSeg)
424  {
425  result = provSeg.findEntity(entityName);
426  return result == nullptr; // Keep going if null, break if not null.
427  });
428  return result;
429  }
430 
431  std::pair<bool, ProviderSegmentT*>
432  _addProviderSegmentIfMissing(const std::string& providerSegmentName)
433  {
434  ProviderSegmentT* provSeg;
435 
436  auto it = this->_container.find(providerSegmentName);
437  if (it == this->_container.end())
438  {
439  if (_addMissingProviderSegmentDuringUpdate)
440  {
441  // Insert into map.
442  provSeg = &addProviderSegment(providerSegmentName);
443  return {true, provSeg};
444  }
445  else
446  {
447  throw error::MissingEntry::create<ProviderSegmentT>(providerSegmentName, *this);
448  }
449  }
450  else
451  {
452  provSeg = &it->second;
453  return {false, provSeg};
454  }
455  }
456 
457 
458  private:
459  bool _addMissingProviderSegmentDuringUpdate = true;
460  };
461 
462 } // namespace armarx::armem::base
armarx::armem::base::detail::GetFindInstanceMixin
Definition: lookup_mixins.h:81
armarx::armem::base::CoreSegmentBase::CoreSegmentBase
CoreSegmentBase()
Definition: CoreSegmentBase.h:68
armarx::armem::base
Definition: CoreSegmentBase.h:15
armarx::armem::base::detail::checkHasProviderSegmentName
void checkHasProviderSegmentName(const MemoryID &providerSegmentID)
Throw armem::error::InvalidMemoryID if the given ID has provider segment name.
Definition: lookup_mixins.cpp:36
armarx::armem::base::detail::GetFindSnapshotMixin
Definition: lookup_mixins.h:224
armarx::armem::base::detail::MemoryContainerBase< std::map< std::string, _ProviderSegmentT >, _Derived >::_derived
DerivedT & _derived()
Definition: MemoryContainerBase.h:111
armarx::armem::base::CoreSegmentBase::name
std::string & name()
Definition: CoreSegmentBase.h:103
armarx::armem::base::CoreSegmentBase::findEntity
EntityT * findEntity(const std::string &entityName)
Definition: CoreSegmentBase.h:199
armarx::aron::ret
ReaderT::InputType T & ret
Definition: rw.h:21
armarx::armem::base::CoreSegmentBase::getProviderSegment
const ProviderSegmentT & getProviderSegment(const MemoryID &providerSegmentID) const
Definition: CoreSegmentBase.h:178
armarx::armem::base::CoreSegmentBase::getKeyString
std::string getKeyString() const
Definition: CoreSegmentBase.h:410
armarx::armem::base::CoreSegmentBase::CoreSegmentBase
CoreSegmentBase(const std::string &name, const MemoryID &parentID, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
Definition: CoreSegmentBase.h:79
armarx::armem::base::CoreSegmentBase::CoreSegmentBase
CoreSegmentBase(const std::string &name, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
Definition: CoreSegmentBase.h:72
MemoryContainerBase.h
armarx::armem::base::CoreSegmentBase::UpdateResult
Definition: CoreSegmentBase.h:47
armarx::armem::MemoryID::providerSegmentName
std::string providerSegmentName
Definition: MemoryID.h:52
armarx::armem::base::detail::AronTyped::AronTyped
AronTyped(aron::type::ObjectPtr aronType=nullptr)
Definition: AronTyped.cpp:9
armarx::armem::base::CoreSegmentBase::hasProviderSegment
bool hasProviderSegment(const std::string &name) const
Definition: CoreSegmentBase.h:116
armarx::armem::base::detail::MemoryContainerBase< std::map< std::string, _ProviderSegmentT >, _Derived >::forEachChild
bool forEachChild(ChildFunctionT &&func)
Definition: MemoryContainerBase.h:64
armarx::armem::base::detail::AronTyped::aronType
aron::type::ObjectPtr & aronType()
Definition: AronTyped.cpp:18
armarx::armem::base::detail::PredictiveContainer
Something that supports a set of prediction engines.
Definition: Predictive.h:91
armarx::armem::base::CoreSegmentBase::_findEntity
static auto * _findEntity(ParentT &&parent, const std::string &entityName)
Definition: CoreSegmentBase.h:419
armarx::armem::base::detail::MemoryContainerBase
Provides default implmentations of MemoryContainer, as well as iterators (which requires a template).
Definition: MemoryContainerBase.h:16
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
AronTyped.h
lookup_mixins.h
armarx::armem::base::CoreSegmentBase::findProviderSegment
ProviderSegmentT * findProviderSegment(const std::string &name)
Definition: CoreSegmentBase.h:130
armarx::armem::base::CoreSegmentBase::equalsDeep
bool equalsDeep(const DerivedT &other) const
Definition: CoreSegmentBase.h:382
armarx::armem::MemoryID::coreSegmentName
std::string coreSegmentName
Definition: MemoryID.h:51
armarx::armem::UpdateType::UpdatedExisting
@ UpdatedExisting
armarx::armem::base::detail::MemoryContainerBase< std::map< std::string, _ProviderSegmentT >, _Derived >::size
std::size_t size() const
Definition: MemoryContainerBase.h:48
armarx::armem::base::CoreSegmentBase::getProviderSegmentNames
std::vector< std::string > getProviderSegmentNames() const
Definition: CoreSegmentBase.h:271
armarx::armem::base::CoreSegmentBase
Data of a core segment containing multiple provider segments.
Definition: CoreSegmentBase.h:22
armarx::armem::base::CoreSegmentBase::findEntity
const EntityT * findEntity(const std::string &entityName) const
Definition: CoreSegmentBase.h:205
armarx::armem::MemoryID::withProviderSegmentName
MemoryID withProviderSegmentName(const std::string &name) const
Definition: MemoryID.cpp:412
armarx::armem::base::CoreSegmentBase< ProviderSegment, CoreSegment >::ProviderSegmentT
ProviderSegment ProviderSegmentT
Definition: CoreSegmentBase.h:40
ProviderSegmentBase.h
armarx::armem::base::CoreSegmentBase::append
void append(const OtherDerivedT &other)
Definition: CoreSegmentBase.h:307
armarx::armem::MemoryID
A memory ID.
Definition: MemoryID.h:47
armarx::armem::base::CoreSegmentBase::forEachInstanceIn
bool forEachInstanceIn(const MemoryID &id, InstanceFunctionT &&func)
Definition: CoreSegmentBase.h:242
armarx::armem::UpdateType
UpdateType
The type of an update.
Definition: Commit.h:18
if
if(!yyvaluep)
Definition: Grammar.cpp:724
armarx::armem::MemoryID::withCoreSegmentName
MemoryID withCoreSegmentName(const std::string &name) const
Definition: MemoryID.cpp:404
armarx::armem::base::CoreSegmentBase::hasProviderSegment
bool hasProviderSegment(const MemoryID &providerSegmentID) const
Definition: CoreSegmentBase.h:123
armarx::armem::base::detail::findChildByKey
auto * findChildByKey(const KeyT &key, ContainerT &&container)
Find a child in a container by its key.
Definition: lookup_mixins.h:32
armarx::armem::base::CoreSegmentBase::forEachInstanceIn
bool forEachInstanceIn(const MemoryID &id, InstanceFunctionT &&func) const
Definition: CoreSegmentBase.h:258
armarx::armem::base::CoreSegmentBase::forEachProviderSegment
bool forEachProviderSegment(ProviderSegmentFunctionT &&func)
Definition: CoreSegmentBase.h:217
armarx::armem::base::detail::GetFindEntityMixin
Definition: lookup_mixins.h:409
armarx::armem::base::CoreSegmentBase::update
UpdateResult update(const EntityUpdate &update)
Updates an entity's history.
Definition: CoreSegmentBase.h:284
armarx::armem::base::CoreSegmentBase::addProviderSegment
ProviderSegmentT & addProviderSegment(const std::string &name, aron::type::ObjectPtr providerSegmentType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
Add an empty provider segment with the given name, optional provider segment type and prediction engi...
Definition: CoreSegmentBase.h:344
armarx::armem::EntityUpdate
An update of an entity for a specific point in time.
Definition: Commit.h:27
armarx::armem::base::CoreSegmentBase::getProviderSegment
ProviderSegmentT & getProviderSegment(const std::string &name)
Definition: CoreSegmentBase.h:143
armarx::armem::base::CoreSegmentBase::UpdateResult::providerSegmentUpdateType
armarx::armem::UpdateType providerSegmentUpdateType
Definition: CoreSegmentBase.h:50
armarx::armem::base::CoreSegmentBase::addProviderSegment
ProviderSegmentT & addProviderSegment(const ProviderSegmentT &providerSegment)
Copy and insert a provider segment.
Definition: CoreSegmentBase.h:355
armarx::armem::base::CoreSegmentBase::UpdateResult::entityUpdateType
armarx::armem::UpdateType entityUpdateType
Definition: CoreSegmentBase.h:51
iteration_mixins.h
armarx::armem::base::CoreSegmentBase::name
const std::string & name() const
Definition: CoreSegmentBase.h:109
armarx::armem::base::detail::getChildByKey
auto & getChildByKey(const KeyT &key, ContainerT &&container, const ParentT &owner, KeyStringFn &&keyStringFn)
Retrieve a child in a container by its key.
Definition: lookup_mixins.h:49
armarx::armem::base::detail::MemoryContainerBase< std::map< std::string, _ProviderSegmentT >, _Derived >::DerivedT
_Derived DerivedT
Definition: MemoryContainerBase.h:23
armarx::armem::base::CoreSegmentBase::forEachProviderSegment
bool forEachProviderSegment(ProviderSegmentFunctionT &&func) const
Definition: CoreSegmentBase.h:227
armarx::armem::base::detail::MemoryItem::id
MemoryID & id()
Definition: MemoryItem.h:27
armarx::armem::base::CoreSegmentBase< ProviderSegment, CoreSegment >::EntityT
typename ProviderSegmentT::EntityT EntityT
Definition: CoreSegmentBase.h:41
armarx::armem::base::detail::forEachInstanceIn
bool forEachInstanceIn(const MemoryID &id, FunctionT &&func, ParentT &parent, bool single, ChildT *child)
Definition: iteration_mixins.h:116
armarx::armem::base::detail::MemoryContainerBase< std::map< std::string, _ProviderSegmentT >, _Derived >::ContainerT
std::map< std::string, _ProviderSegmentT > ContainerT
Definition: MemoryContainerBase.h:24
armarx::armem::base::CoreSegmentBase::operator=
CoreSegmentBase & operator=(const CoreSegmentBase &other)=default
armarx::armem::base::CoreSegmentBase::addProviderSegment
ProviderSegmentT & addProviderSegment(ProviderSegmentT &&providerSegment)
Move and insert a provider segment.
Definition: CoreSegmentBase.h:363
armarx::armem::base::CoreSegmentBase::UpdateResult::removedSnapshots
std::vector< EntitySnapshotT > removedSnapshots
Definition: CoreSegmentBase.h:53
armarx::armem::base::CoreSegmentBase::UpdateResult::coreSegmentUpdateType
armarx::armem::UpdateType coreSegmentUpdateType
Definition: CoreSegmentBase.h:49
armarx::armem::base::CoreSegmentBase::getProviderSegment
const ProviderSegmentT & getProviderSegment(const std::string &name) const
Definition: CoreSegmentBase.h:149
armarx::armem::base::detail::ForEachEntitySnapshotMixin
Definition: iteration_mixins.h:225
armarx::armem::base::CoreSegmentBase::addProviderSegment
ProviderSegmentT & addProviderSegment(const std::string &name, Args... args)
Insert a provider segment in-place.
Definition: CoreSegmentBase.h:372
armarx::armem::base::CoreSegmentBase< ProviderSegment, CoreSegment >::EntitySnapshotT
typename EntityT::EntitySnapshotT EntitySnapshotT
Definition: CoreSegmentBase.h:42
armarx::armem::base::detail::AronTyped
Something with a specific ARON type.
Definition: AronTyped.h:12
armarx::armem::base::CoreSegmentBase::findProviderSegment
const ProviderSegmentT * findProviderSegment(const std::string &name) const
Definition: CoreSegmentBase.h:136
armarx::armem::base::CoreSegmentBase::getProviderSegment
ProviderSegmentT & getProviderSegment(const MemoryID &providerSegmentID)
Definition: CoreSegmentBase.h:171
armarx::armem::base::CoreSegmentBase::CoreSegmentBase
CoreSegmentBase(const MemoryID &id, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
Definition: CoreSegmentBase.h:87
armarx::armem::base::detail::ForEachEntityInstanceMixin
Definition: iteration_mixins.h:137
armarx::armem::UpdateType::InsertedNew
@ InsertedNew
armarx::armem::base::CoreSegmentBase::_addProviderSegmentIfMissing
std::pair< bool, ProviderSegmentT * > _addProviderSegmentIfMissing(const std::string &providerSegmentName)
Definition: CoreSegmentBase.h:432
armarx::armem::base::CoreSegmentBase::findProviderSegment
ProviderSegmentT * findProviderSegment(const MemoryID &providerSegmentID)
Definition: CoreSegmentBase.h:156
armarx::armem::base::detail::ForEachEntityMixin
Definition: iteration_mixins.h:251
armarx::armem::base::CoreSegmentBase< ProviderSegment, CoreSegment >::EntityInstanceT
typename EntitySnapshotT::EntityInstanceT EntityInstanceT
Definition: CoreSegmentBase.h:43
armarx::armem::base::CoreSegmentBase::UpdateResult::id
MemoryID id
Definition: CoreSegmentBase.h:52
armarx::armem::base::CoreSegmentBase::hasEntity
bool hasEntity(const std::string &entityName) const
Definition: CoreSegmentBase.h:193
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
Logging.h
armarx::armem::base::detail::Predictive< _Derived >::predictionEngines
const std::vector< PredictionEngine > & predictionEngines() const
Definition: Predictive.h:48
armarx::armem::base::CoreSegmentBase::UpdateResult::UpdateResult
UpdateResult()=default
armarx::armem::base::CoreSegmentBase::getLevelName
static std::string getLevelName()
Definition: CoreSegmentBase.h:404
armarx::armem::base::detail::MemoryContainerBase< std::map< std::string, _ProviderSegmentT >, _Derived >::_container
ContainerT _container
Definition: MemoryContainerBase.h:150
armarx::armem::EntityUpdate::entityID
MemoryID entityID
The entity's ID.
Definition: Commit.h:30
armarx::armem::base::CoreSegmentBase::UpdateResult::UpdateResult
UpdateResult(const typename ProviderSegmentT::UpdateResult &c)
Definition: CoreSegmentBase.h:57
armarx::armem::base::CoreSegmentBase< ProviderSegment, CoreSegment >::ChildT
ProviderSegmentT ChildT
Definition: CoreSegmentBase.h:45
armarx::armem::base::CoreSegmentBase::findProviderSegment
const ProviderSegmentT * findProviderSegment(const MemoryID &providerSegmentID) const
Definition: CoreSegmentBase.h:163
armarx::armem::base::detail::MemoryContainerBase< std::map< std::string, _ProviderSegmentT >, _Derived >::_checkContainerName
void _checkContainerName(const std::string &gottenName, const std::string &actualName, bool emptyOk=true) const
Definition: MemoryContainerBase.h:124
Predictive.h
armarx::human::MemoryID
const armem::MemoryID MemoryID
Definition: memory_ids.cpp:29