ProviderSegment Class Reference

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

+ Inheritance diagram for ProviderSegment:

Public Member Functions

template<class... Args>
EntityaddEntity (const std::string &name, Args... args)
 
- Public Member Functions inherited from ProviderSegmentBase< Entity, ProviderSegment >
EntityTaddEntity (const EntityT &entity)
 Copy and insert an entity.
 
EntityTaddEntity (const EntityT &entity)
 Copy and insert an entity.
 
EntityTaddEntity (const std::string &name)
 Add an empty entity with the given name.
 
EntityTaddEntity (const std::string &name)
 Add an empty entity with the given name.
 
EntityTaddEntity (const std::string &name, Args... args)
 Insert an entity in-place.
 
EntityTaddEntity (const std::string &name, Args... args)
 Insert an entity in-place.
 
EntityTaddEntity (EntityT &&entity)
 Move and insert an entity.
 
EntityTaddEntity (EntityT &&entity)
 Move and insert an entity.
 
void append (const OtherDerivedT &other)
 
void append (const OtherDerivedT &other)
 
bool equalsDeep (const DerivedT &other) const
 
bool equalsDeep (const DerivedT &other) const
 
EntityTfindEntity (const MemoryID &entityID)
 
EntityTfindEntity (const MemoryID &entityID)
 
const EntityTfindEntity (const MemoryID &entityID) const
 
const EntityTfindEntity (const MemoryID &entityID) const
 
EntityTfindEntity (const std::string &name)
 
EntityTfindEntity (const std::string &name)
 
const EntityTfindEntity (const std::string &name) const
 
const EntityTfindEntity (const std::string &name) const
 
bool forEachEntity (EntityFunctionT &&func)
 
bool forEachEntity (EntityFunctionT &&func)
 
bool forEachEntity (EntityFunctionT &&func) const
 
bool forEachEntity (EntityFunctionT &&func) 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
 
EntityTgetEntity (const MemoryID &entityID)
 
EntityTgetEntity (const MemoryID &entityID)
 
const EntityTgetEntity (const MemoryID &entityID) const
 
const EntityTgetEntity (const MemoryID &entityID) const
 
EntityTgetEntity (const std::string &name)
 
EntityTgetEntity (const std::string &name)
 
const EntityTgetEntity (const std::string &name) const
 
const EntityTgetEntity (const std::string &name) const
 
std::vector< std::string > getEntityNames () const
 
std::vector< std::string > getEntityNames () const
 
std::string getKeyString () const
 
std::string getKeyString () const
 
bool hasEntity (const MemoryID &entityID) const
 
bool hasEntity (const MemoryID &entityID) const
 
bool hasEntity (const std::string &name) const
 
bool hasEntity (const std::string &name) const
 
std::string & name ()
 
std::string & name ()
 
const std::string & name () const
 
const std::string & name () const
 
ProviderSegmentBaseoperator= (const ProviderSegmentBase &other)=default
 
ProviderSegmentBaseoperator= (const ProviderSegmentBase &other)=default
 
ProviderSegmentBaseoperator= (ProviderSegmentBase &&other)=default
 
ProviderSegmentBaseoperator= (ProviderSegmentBase &&other)=default
 
 ProviderSegmentBase ()
 
 ProviderSegmentBase ()
 
 ProviderSegmentBase (const MemoryID id, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 ProviderSegmentBase (const MemoryID id, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 ProviderSegmentBase (const ProviderSegmentBase &other)=default
 
 ProviderSegmentBase (const ProviderSegmentBase &other)=default
 
 ProviderSegmentBase (const std::string &name, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 ProviderSegmentBase (const std::string &name, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 ProviderSegmentBase (const std::string &name, const MemoryID parentID, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 ProviderSegmentBase (const std::string &name, const MemoryID parentID, aron::type::ObjectPtr aronType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
 
 ProviderSegmentBase (ProviderSegmentBase &&other)=default
 
 ProviderSegmentBase (ProviderSegmentBase &&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 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 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 MaxHistorySizeParent< ProviderSegment >
void setMaxHistorySize (long maxSize)
 Sets the maximum history size of entities in this container.
 
void setTruncateMaxBatchSize (size_t batchSize)
 Sets the maximum batch size for truncation.
 
void setUnlimitedHistoryWarningThreshold (size_t threshold)
 Sets the warning threshold for unlimited history growth.
 
- Public Member Functions inherited from MaxHistorySize
long getMaxHistorySize () const
 
size_t getTruncateMaxBatchSize () const
 
size_t getUnlimitedHistoryWarningThreshold () const
 
void setMaxHistorySize (long maxSize, const std::string &additionalInfo="")
 Set the maximum number of snapshots to be contained in an entity.
 
void setTruncateMaxBatchSize (size_t batchSize)
 Set the maximum number of snapshots to remove per truncate() call.
 
void setUnlimitedHistoryWarningThreshold (size_t threshold)
 Set the threshold for warning about unlimited history growth.
 
- Public Member Functions inherited from FindInstanceDataMixin< ProviderSegment >
aron::data::DictPtr findLatestInstanceData (const MemoryID &entityID, int instanceIndex=0) const
 
std::optional< AronDtoT > findLatestInstanceDataAs (const MemoryID &entityID, int instanceIndex=0) const
 
- Public Member Functions inherited from Prediction< ProviderSegment >
void addPredictor (const PredictionEngine &engine, Predictor &&predictor)
 
std::vector< PredictionResultdispatchPredictions (const std::vector< PredictionRequest > &requests)
 Resolves mapping of requests to predictors and dispatches them.
 
PredictionResult dispatchTargetedPrediction (const PredictionRequest &request, const MemoryID &target)
 Dispatches a single prediction request (assuming resolution was done by the caller).
 
 Prediction (const std::map< PredictionEngine, Predictor > &predictors={})
 
void setPredictors (const std::map< PredictionEngine, Predictor > &predictors)
 

Additional Inherited Members

- Public Types inherited from ProviderSegmentBase< Entity, ProviderSegment >
using ChildT
 
using EntityInstanceT
 
using EntitySnapshotT
 
using EntityT
 
- Public Types inherited from MemoryContainerBase< _ContainerT, _DerivedT >
using ContainerT = _ContainerT
 
using DerivedT = _DerivedT
 
- Static Public Member Functions inherited from ProviderSegmentBase< Entity, ProviderSegment >
static std::string getLevelName ()
 
static std::string getLevelName ()
 
- 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 ()
 
- 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.
 
- Protected Attributes inherited from MaxHistorySize
long _maxHistorySize = 120000
 Maximum size of entity histories.
 
size_t _truncateMaxBatchSize = 100
 Maximum number of snapshots to remove per truncate() call.
 
size_t _unlimitedHistoryWarningThreshold = 500000
 Threshold for warning about unlimited history growth.
 

Detailed Description

See also
base::ProviderSegmentBase

Definition at line 107 of file memory_definitions.h.

Member Function Documentation

◆ addEntity()

template<class... Args>
Entity & addEntity ( const std::string & name,
Args... args )
inline

Definition at line 121 of file memory_definitions.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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