CoreSegment Class Reference

Client-side working memory core segment. More...

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

+ Inheritance diagram for CoreSegment:

Public Member Functions

 CoreSegmentBase ()
 
 CoreSegmentBase (const CoreSegmentBase &other)=default
 
 CoreSegmentBase (const MemoryID &id, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (const std::string &name, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (const std::string &name, const MemoryID &parentID, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (CoreSegmentBase &&other)=default
 
- Public Member Functions inherited from CoreSegmentBase< ProviderSegment, CoreSegment >
ProviderSegmentTaddProviderSegment (const ProviderSegmentT &providerSegment)
 Copy and insert a provider segment.
 
ProviderSegmentTaddProviderSegment (const ProviderSegmentT &providerSegment)
 Copy and insert a provider segment.
 
ProviderSegmentTaddProviderSegment (const std::string &name, Args... args)
 Insert a provider segment in-place.
 
ProviderSegmentTaddProviderSegment (const std::string &name, Args... args)
 Insert a provider segment in-place.
 
ProviderSegmentTaddProviderSegment (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 engines.
 
ProviderSegmentTaddProviderSegment (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 engines.
 
ProviderSegmentTaddProviderSegment (ProviderSegmentT &&providerSegment)
 Move and insert a provider segment.
 
ProviderSegmentTaddProviderSegment (ProviderSegmentT &&providerSegment)
 Move and insert a provider segment.
 
void append (const OtherDerivedT &other)
 
void append (const OtherDerivedT &other)
 
 CoreSegmentBase ()
 
 CoreSegmentBase ()
 
 CoreSegmentBase (const CoreSegmentBase &other)=default
 
 CoreSegmentBase (const CoreSegmentBase &other)=default
 
 CoreSegmentBase (const MemoryID &id, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (const MemoryID &id, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (const std::string &name, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (const std::string &name, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (const std::string &name, const MemoryID &parentID, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (const std::string &name, const MemoryID &parentID, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 CoreSegmentBase (CoreSegmentBase &&other)=default
 
 CoreSegmentBase (CoreSegmentBase &&other)=default
 
bool equalsDeep (const DerivedT &other) const
 
bool equalsDeep (const DerivedT &other) const
 
EntityTfindEntity (const std::string &entityName)
 
EntityTfindEntity (const std::string &entityName)
 
const EntityTfindEntity (const std::string &entityName) const
 
const EntityTfindEntity (const std::string &entityName) const
 
ProviderSegmentTfindProviderSegment (const MemoryID &providerSegmentID)
 
ProviderSegmentTfindProviderSegment (const MemoryID &providerSegmentID)
 
const ProviderSegmentTfindProviderSegment (const MemoryID &providerSegmentID) const
 
const ProviderSegmentTfindProviderSegment (const MemoryID &providerSegmentID) const
 
ProviderSegmentTfindProviderSegment (const std::string &name)
 
ProviderSegmentTfindProviderSegment (const std::string &name)
 
const ProviderSegmentTfindProviderSegment (const std::string &name) const
 
const ProviderSegmentTfindProviderSegment (const std::string &name) const
 
bool forEachInstanceIn (const MemoryID &id, InstanceFunctionT &&func)
 
bool forEachInstanceIn (const MemoryID &id, InstanceFunctionT &&func)
 
bool forEachInstanceIn (const MemoryID &id, InstanceFunctionT &&func) const
 
bool forEachInstanceIn (const MemoryID &id, InstanceFunctionT &&func) const
 
bool forEachProviderSegment (ProviderSegmentFunctionT &&func)
 
bool forEachProviderSegment (ProviderSegmentFunctionT &&func)
 
bool forEachProviderSegment (ProviderSegmentFunctionT &&func) const
 
bool forEachProviderSegment (ProviderSegmentFunctionT &&func) const
 
std::string getKeyString () const
 
std::string getKeyString () const
 
ProviderSegmentTgetProviderSegment (const MemoryID &providerSegmentID)
 
ProviderSegmentTgetProviderSegment (const MemoryID &providerSegmentID)
 
const ProviderSegmentTgetProviderSegment (const MemoryID &providerSegmentID) const
 
const ProviderSegmentTgetProviderSegment (const MemoryID &providerSegmentID) const
 
ProviderSegmentTgetProviderSegment (const std::string &name)
 
ProviderSegmentTgetProviderSegment (const std::string &name)
 
const ProviderSegmentTgetProviderSegment (const std::string &name) const
 
const ProviderSegmentTgetProviderSegment (const std::string &name) const
 
std::vector< std::string > getProviderSegmentNames () const
 
std::vector< std::string > getProviderSegmentNames () const
 
bool hasEntity (const std::string &entityName) const
 
bool hasEntity (const std::string &entityName) const
 
bool hasProviderSegment (const MemoryID &providerSegmentID) const
 
bool hasProviderSegment (const MemoryID &providerSegmentID) const
 
bool hasProviderSegment (const std::string &name) const
 
bool hasProviderSegment (const std::string &name) const
 
std::string & name ()
 
std::string & name ()
 
const std::string & name () const
 
const std::string & name () const
 
CoreSegmentBaseoperator= (const CoreSegmentBase &other)=default
 
CoreSegmentBaseoperator= (const CoreSegmentBase &other)=default
 
CoreSegmentBaseoperator= (CoreSegmentBase &&other)=default
 
CoreSegmentBaseoperator= (CoreSegmentBase &&other)=default
 
UpdateResult update (const EntityUpdate &update)
 Updates an entity's history.
 
UpdateResult update (const EntityUpdate &update)
 Updates an entity's history.
 
- Public Member Functions inherited from MemoryContainerBase< _ContainerT, _DerivedT >
ContainerT::iterator begin ()
 
ContainerT::const_iterator begin () const
 
void clear ()
 
bool empty () const
 
ContainerT::iterator end ()
 
ContainerT::const_iterator end () const
 
template<class ChildFunctionT>
bool forEachChild (ChildFunctionT &&func)
 
template<class ChildFunctionT>
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 AronTyped
aron::type::ObjectPtraronType ()
 
aron::type::ObjectPtr aronType () const
 
 AronTyped (aron::type::ObjectPtr aronType=nullptr)
 
bool hasAronType () const
 
void setAronType (aron::type::ObjectPtr aronType)
 
- Public Member Functions inherited from PredictiveContainer< DerivedT >
std::map< MemoryID, std::vector< PredictionEngine > > getAllPredictionEngines () const
 
- Public Member Functions inherited from Predictive< DerivedT >
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< DerivedT >
template<class InstanceFunctionT>
bool forEachInstance (InstanceFunctionT &&func)
 
template<class InstanceFunctionT>
bool forEachInstance (InstanceFunctionT &&func) const
 
template<class AronDtoFunctionT>
bool forEachInstanceAs (AronDtoFunctionT &&func) const
 Call func on the data of each instance converted to Aron DTO class.
 
template<class EntityInstanceBaseAronDtoFunctionT>
bool forEachInstanceWithDataAs (EntityInstanceBaseAronDtoFunctionT &&func) const
 Call func on each instance with its data converted to Aron DTO class.
 
- Public Member Functions inherited from ForEachEntitySnapshotMixin< DerivedT >
template<class SnapshotFunctionT>
bool forEachSnapshot (SnapshotFunctionT &&func)
 
template<class SnapshotFunctionT>
bool forEachSnapshot (SnapshotFunctionT &&func) const
 
- Public Member Functions inherited from ForEachEntityMixin< DerivedT >
template<class FunctionT>
bool forEachEntity (FunctionT &&func)
 
template<class FunctionT>
bool forEachEntity (FunctionT &&func) const
 
- Public Member Functions inherited from GetFindInstanceMixin< DerivedT >
auto * findInstance (const MemoryID &instanceID)
 Find an entity instance.
 
const auto * findInstance (const MemoryID &instanceID) const
 
auto & getInstance (const MemoryID &instanceID)
 Retrieve an entity instance.
 
const auto & getInstance (const MemoryID &instanceID) const
 
bool hasInstance (const MemoryID &instanceID) const
 Indicate whether this container has an instance with the given ID.
 
bool hasInstances () const
 Indicate whether this container contains at least one entity instance.
 
- Public Member Functions inherited from GetFindSnapshotMixin< DerivedT >
auto * findLatestInstance (const MemoryID &entityID, int instanceIndex=0)
 Find the latest entity instance in the given entity.
 
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.
 
auto * findLatestSnapshot ()
 
const auto * findLatestSnapshot () const
 Find the latest entity snapshot.
 
auto * findLatestSnapshot (const MemoryID &entityID)
 Find the latest entity snapshot in the given entity.
 
const auto * findLatestSnapshot (const MemoryID &entityID) const
 
auto * findSnapshot (const MemoryID &snapshotID)
 Find an entity snapshot.
 
const auto * findSnapshot (const MemoryID &snapshotID) const
 
auto & getSnapshot (const MemoryID &snapshotID)
 Retrieve an entity snapshot.
 
const auto & getSnapshot (const MemoryID &snapshotID) const
 
bool hasSnapshot (const MemoryID &snapshotID) const
 Indicates whether a snapshot with the given ID exists.
 
bool hasSnapshots () const
 Indicate whether this container contains at least one entity snapshot.
 
- Public Member Functions inherited from GetLatestInstanceMixin< DerivedT >
auto & getLatestInstance (int instanceIndex=0)
 Retrieve the latest entity instance.
 
const auto & getLatestInstance (int instanceIndex=0) const
 
- Public Member Functions inherited from GetLatestSnapshotMixin< DerivedT >
auto & getLatestSnapshot (int snapshotIndex=0)
 Retrieve the latest entity snapshot.
 
const auto & getLatestSnapshot (int snapshotIndex=0) const
 
- Public Member Functions inherited from GetFindEntityMixin< DerivedT >
auto * findEntity (const MemoryID &entityID)
 Find an entity.
 
const auto * findEntity (const MemoryID &entityID) const
 
auto & getEntity (const MemoryID &entityID)
 Retrieve an entity.
 
const auto & getEntity (const MemoryID &entityID) const
 
bool hasEntity (const MemoryID &entityID) const
 
- Public Member Functions inherited from FindInstanceDataMixin< CoreSegment >
aron::data::DictPtr findLatestInstanceData (const MemoryID &entityID, int instanceIndex=0) const
 
std::optional< AronDtoT > findLatestInstanceDataAs (const MemoryID &entityID, int instanceIndex=0) const
 

Additional Inherited Members

- Public Types inherited from CoreSegmentBase< ProviderSegment, CoreSegment >
using ChildT
 
typedef std::map< std::string, ProviderSegment > ContainerT
 
using ContainerT
 
typedef CoreSegment DerivedT
 
using DerivedT
 
using EntityInstanceT
 
using EntitySnapshotT
 
using EntityT
 
using ProviderSegmentT
 
- Public Types inherited from MemoryContainerBase< _ContainerT, _DerivedT >
using ContainerT = _ContainerT
 
using DerivedT = _DerivedT
 
- Static Public Member Functions inherited from CoreSegmentBase< ProviderSegment, CoreSegment >
static std::string getLevelName ()
 
static std::string getLevelName ()
 
- Protected Member Functions inherited from CoreSegmentBase< ProviderSegment, CoreSegment >
std::pair< bool, ProviderSegmentT * > _addProviderSegmentIfMissing (const std::string &providerSegmentName)
 
std::pair< bool, ProviderSegmentT * > _addProviderSegmentIfMissing (const std::string &providerSegmentName)
 
- Protected Member Functions inherited from MemoryContainerBase< _ContainerT, _DerivedT >
template<class ChildT, class KeyT, class... ChildArgs>
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 ()
 
- Static Protected Member Functions inherited from CoreSegmentBase< ProviderSegment, CoreSegment >
static auto * _findEntity (ParentT &&parent, const std::string &entityName)
 
static auto * _findEntity (ParentT &&parent, const std::string &entityName)
 
- Protected Attributes inherited from MemoryContainerBase< _ContainerT, _DerivedT >
ContainerT _container
 
- Protected Attributes inherited from MemoryItem
MemoryID _id
 
- Protected Attributes inherited from AronTyped
aron::type::ObjectPtr _aronType
 The expected Aron type. May be nullptr, in which case no type information is available.
 

Detailed Description

Client-side working memory core segment.

See also
base::CoreSegmentBase

Definition at line 119 of file memory_definitions.h.

Member Function Documentation

◆ CoreSegmentBase() [1/6]

CoreSegmentBase ( )
inline

Definition at line 70 of file CoreSegmentBase.h.

◆ CoreSegmentBase() [2/6]

CoreSegmentBase ( const CoreSegmentBase & other)
default

◆ CoreSegmentBase() [3/6]

CoreSegmentBase ( const MemoryID & id,
aron::type::ObjectPtr aronType = nullptr,
const std::vector< PredictionEngine > & predictionEngines = {} )
inlineexplicit

Definition at line 89 of file CoreSegmentBase.h.

◆ CoreSegmentBase() [4/6]

CoreSegmentBase ( const std::string & name,
aron::type::ObjectPtr aronType = nullptr,
const std::vector< PredictionEngine > & predictionEngines = {} )
inlineexplicit

Definition at line 74 of file CoreSegmentBase.h.

◆ CoreSegmentBase() [5/6]

CoreSegmentBase ( const std::string & name,
const MemoryID & parentID,
aron::type::ObjectPtr aronType = nullptr,
const std::vector< PredictionEngine > & predictionEngines = {} )
inlineexplicit

Definition at line 81 of file CoreSegmentBase.h.

◆ CoreSegmentBase() [6/6]

CoreSegmentBase ( CoreSegmentBase && other)
default

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