Memory Class Reference

Client-side working memory. More...

#include <RobotAPI/libraries/armem/core/wm/memory_definitions.h>

+ Inheritance diagram for Memory:

Additional Inherited Members

- Public Types inherited from MemoryBase< CoreSegment, Memory >
using ChildT = CoreSegmentT
 
using CoreSegmentT = CoreSegment
 
using EntityInstanceT = typename EntitySnapshotT::EntityInstanceT
 
using EntitySnapshotT = typename EntityT::EntitySnapshotT
 
using EntityT = typename ProviderSegmentT::EntityT
 
using ProviderSegmentT = typename CoreSegmentT::ProviderSegmentT
 
- Public Types inherited from MemoryContainerBase< std::map< std::string, CoreSegment >, Memory >
using ContainerT = std::map< std::string, CoreSegment >
 
using DerivedT = Memory
 
- Public Member Functions inherited from MemoryBase< CoreSegment, Memory >
CoreSegmentTaddCoreSegment (const CoreSegmentT &coreSegment)
 Copy and insert a core segment. More...
 
CoreSegmentTaddCoreSegment (const std::string &name, Args... args)
 Move and insert a core segment. More...
 
CoreSegmentTaddCoreSegment (const std::string &name, aron::type::ObjectPtr coreSegmentType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 Add an empty core segment with the given name, type and prediction engines. More...
 
CoreSegmentTaddCoreSegment (CoreSegmentT &&coreSegment)
 Move and insert a core segment. More...
 
void append (const OtherDerivedT &other)
 Merge another memory into this one. More...
 
bool equalsDeep (const MemoryBase &other) const
 
CoreSegmentTfindCoreSegment (const MemoryID &coreSegmentID)
 
const CoreSegmentTfindCoreSegment (const MemoryID &coreSegmentID) const
 
CoreSegmentTfindCoreSegment (const std::string &name)
 
const CoreSegmentTfindCoreSegment (const std::string &name) const
 
bool forEachCoreSegment (CoreSegmentFunctionT &&func)
 
bool forEachCoreSegment (CoreSegmentFunctionT &&func) const
 
bool forEachInstanceIn (const MemoryID &id, InstanceFunctionT &&func)
 
bool forEachInstanceIn (const MemoryID &id, InstanceFunctionT &&func) const
 
CoreSegmentTgetCoreSegment (const MemoryID &coreSegmentID)
 
const CoreSegmentTgetCoreSegment (const MemoryID &coreSegmentID) const
 
CoreSegmentTgetCoreSegment (const std::string &name)
 
const CoreSegmentTgetCoreSegment (const std::string &name) const
 
std::vector< std::string > getCoreSegmentNames () const
 
std::string getKeyString () const
 
bool hasCoreSegment (const MemoryID &coreSegmentID) const
 
bool hasCoreSegment (const std::string &name) const
 
 MemoryBase ()
 
 MemoryBase (const MemoryBase &other)=default
 
 MemoryBase (const MemoryID &id, const std::vector< PredictionEngine > &predictionEngines={})
 
 MemoryBase (const std::string &name, const std::vector< PredictionEngine > &predictionEngines={})
 
 MemoryBase (MemoryBase &&other)=default
 
std::string & name ()
 
const std::string & name () const
 
MemoryBaseoperator= (const MemoryBase &other)=default
 
MemoryBaseoperator= (MemoryBase &&other)=default
 
void setName (const std::string &name)
 
std::vector< UpdateResult > update (const Commit &commit, const bool addMissingCoreSegmentDuringUpdate=false, const bool checkMemoryName=true)
 Store all updates in commit. More...
 
UpdateResult update (const EntityUpdate &update, const bool addMissingCoreSegmentDuringUpdate=false, const bool checkMemoryName=true)
 Store the given update. More...
 
- Public Member Functions inherited from MemoryContainerBase< std::map< std::string, CoreSegment >, Memory >
ContainerT::iterator begin ()
 
ContainerT::const_iterator begin () const
 
void clear ()
 
bool empty () const
 
ContainerT::iterator end ()
 
ContainerT::const_iterator end () const
 
bool forEachChild (ChildFunctionT &&func)
 
bool forEachChild (ChildFunctionT &&func) const
 
 MemoryContainerBase ()
 
 MemoryContainerBase (const MemoryContainerBase &other)=default
 
 MemoryContainerBase (const MemoryID &id)
 
 MemoryContainerBase (MemoryContainerBase &&other)=default
 
MemoryContainerBaseoperator= (const MemoryContainerBase &other)=default
 
MemoryContainerBaseoperator= (MemoryContainerBase &&other)=default
 
std::size_t size () const
 
- Public Member Functions inherited from MemoryItem
MemoryIDid ()
 
const MemoryIDid () const
 
 MemoryItem ()
 
 MemoryItem (const MemoryID &id)
 
 MemoryItem (const MemoryItem &other)=default
 
 MemoryItem (MemoryItem &&other)=default
 
MemoryItemoperator= (const MemoryItem &other)=default
 
MemoryItemoperator= (MemoryItem &&other)=default
 
- Public Member Functions inherited from PredictiveContainer< Memory >
std::map< MemoryID, std::vector< PredictionEngine > > getAllPredictionEngines () const
 
- Public Member Functions inherited from Predictive< Memory >
void addPredictionEngine (const PredictionEngine &engine)
 
std::map< MemoryID, std::vector< PredictionEngine > > getAllPredictionEngines () const
 
const std::vector< PredictionEngine > & predictionEngines () const
 
 Predictive (const std::vector< PredictionEngine > &engines={})
 
void setPredictionEngines (const std::vector< PredictionEngine > &engines)
 
- Public Member Functions inherited from ForEachEntityInstanceMixin< Memory >
bool forEachInstance (InstanceFunctionT &&func)
 
bool forEachInstance (InstanceFunctionT &&func) const
 
bool forEachInstanceAs (AronDtoFunctionT &&func) const
 Call func on the data of each instance converted to Aron DTO class. More...
 
bool forEachInstanceWithDataAs (EntityInstanceBaseAronDtoFunctionT &&func) const
 Call func on each instance with its data converted to Aron DTO class. More...
 
- Public Member Functions inherited from ForEachEntitySnapshotMixin< Memory >
bool forEachSnapshot (SnapshotFunctionT &&func)
 
bool forEachSnapshot (SnapshotFunctionT &&func) const
 
- Public Member Functions inherited from ForEachEntityMixin< Memory >
bool forEachEntity (FunctionT &&func)
 
bool forEachEntity (FunctionT &&func) const
 
- Public Member Functions inherited from ForEachProviderSegmentMixin< Memory >
bool forEachProviderSegment (FunctionT &&func)
 
bool forEachProviderSegment (FunctionT &&func) const
 
- Public Member Functions inherited from GetFindInstanceMixin< Memory >
auto * findInstance (const MemoryID &instanceID)
 Find an entity instance. More...
 
const auto * findInstance (const MemoryID &instanceID) const
 
auto & getInstance (const MemoryID &instanceID)
 Retrieve an entity instance. More...
 
const auto & getInstance (const MemoryID &instanceID) const
 
bool hasInstance (const MemoryID &instanceID) const
 Indicate whether this container has an instance with the given ID. More...
 
bool hasInstances () const
 Indicate whether this container contains at least one entity instance. More...
 
- Public Member Functions inherited from GetFindSnapshotMixin< Memory >
auto * findLatestInstance (const MemoryID &entityID, int instanceIndex=0)
 Find the latest entity instance in the given entity. More...
 
const auto * findLatestInstance (const MemoryID &entityID, int instanceIndex=0) const
 
auto * findLatestInstance (int instanceIndex=0)
 
const auto * findLatestInstance (int instanceIndex=0) const
 Find the latest entity instance. More...
 
auto * findLatestSnapshot ()
 
const auto * findLatestSnapshot () const
 Find the latest entity snapshot. More...
 
auto * findLatestSnapshot (const MemoryID &entityID)
 Find the latest entity snapshot in the given entity. More...
 
const auto * findLatestSnapshot (const MemoryID &entityID) const
 
auto * findSnapshot (const MemoryID &snapshotID)
 Find an entity snapshot. More...
 
const auto * findSnapshot (const MemoryID &snapshotID) const
 
auto & getSnapshot (const MemoryID &snapshotID)
 Retrieve an entity snapshot. More...
 
const auto & getSnapshot (const MemoryID &snapshotID) const
 
bool hasSnapshot (const MemoryID &snapshotID) const
 Indicates whether a snapshot with the given ID exists. More...
 
bool hasSnapshots () const
 Indicate whether this container contains at least one entity snapshot. More...
 
- Public Member Functions inherited from GetLatestInstanceMixin< Memory >
auto & getLatestInstance (int instanceIndex=0)
 Retrieve the latest entity instance. More...
 
const auto & getLatestInstance (int instanceIndex=0) const
 
- Public Member Functions inherited from GetLatestSnapshotMixin< Memory >
auto & getLatestSnapshot (int snapshotIndex=0)
 Retrieve the latest entity snapshot. More...
 
const auto & getLatestSnapshot (int snapshotIndex=0) const
 
- Public Member Functions inherited from GetFindEntityMixin< Memory >
auto * findEntity (const MemoryID &entityID)
 Find an entity. More...
 
const auto * findEntity (const MemoryID &entityID) const
 
auto & getEntity (const MemoryID &entityID)
 Retrieve an entity. More...
 
const auto & getEntity (const MemoryID &entityID) const
 
bool hasEntity (const MemoryID &entityID) const
 
- Public Member Functions inherited from GetFindProviderSegmentMixin< Memory >
auto * findProviderSegment (const MemoryID &providerSegmentID)
 Retrieve a provider segment. More...
 
const auto * findProviderSegment (const MemoryID &providerSegmentID) const
 
auto & getProviderSegment (const MemoryID &providerSegmentID)
 Retrieve a provider segment. More...
 
const auto & getProviderSegment (const MemoryID &providerSegmentID) const
 
bool hasProviderSegment (const MemoryID &providerSegmentID) const
 
- Public Member Functions inherited from FindInstanceDataMixin< Memory >
aron::data::DictPtr findLatestInstanceData (const MemoryID &entityID, int instanceIndex=0) const
 
std::optional< AronDtoT > findLatestInstanceDataAs (const MemoryID &entityID, int instanceIndex=0) const
 
- Static Public Member Functions inherited from MemoryBase< CoreSegment, Memory >
static std::string getLevelName ()
 
- Protected Member Functions inherited from MemoryBase< CoreSegment, Memory >
std::pair< bool, CoreSegmentT * > _addCoreSegmentIfMissing (const std::string &coreSegmentName, const bool addMissingCoreSegmentDuringUpdate)
 
- Protected Member Functions inherited from MemoryContainerBase< std::map< std::string, CoreSegment >, Memory >
ChildT & _addChild (const KeyT &key, ChildArgs... childArgs)
 
void _checkContainerName (const std::string &gottenName, const std::string &actualName, bool emptyOk=true) const
 
DerivedT_derived ()
 
const DerivedT_derived () const
 
ContainerTcontainer ()
 
const ContainerTcontainer () const
 
- Protected Member Functions inherited from MemoryItem
 ~MemoryItem ()
 
- Protected Attributes inherited from MemoryContainerBase< std::map< std::string, CoreSegment >, Memory >
ContainerT _container
 
- Protected Attributes inherited from MemoryItem
MemoryID _id
 

Detailed Description

Client-side working memory.

See also
base::MemoryBase

Definition at line 133 of file memory_definitions.h.


The documentation for this class was generated from the following file: