EntitySnapshotBase< InstanceT > Class Template Referenceabstract

Interface functions for the longterm memory classes. More...

#include <RobotAPI/libraries/armem/server/ltm/detail/EntitySnapshotBase.h>

+ Inheritance diagram for EntitySnapshotBase< InstanceT >:

Classes

struct  Statistics
 

Public Member Functions

std::shared_ptr< InstanceT > findInstance (const int instanceId) const
 find Instance segment
 
bool forEachInstance (std::function< void(InstanceT &)> func) const
 iterate over all Instance segments of this ltm
 
Statistics getStatistics () const
 
bool hasInstance (const int instanceId) const
 check if Instance segment exists
 
void loadAllReferences (armem::wm::EntitySnapshot &e) const
 return the full sub-ltm as a wm::EntitySnapshot with only references the ltm may be huge, use with caution
 
 MemoryItem (const std::string &exportName, const MemoryID &)
 
 MemoryItem (const std::string &exportName, const MemoryID &, const std::shared_ptr< Processors > &)
 
void resetStatistics ()
 statistics
 
void resolve (armem::wm::EntitySnapshot &e) const
 convert the references of the input into a wm::Memory
 
void store (const armem::wm::EntitySnapshot &e)
 encode the content of a wm::Memory and store
 
- Public Member Functions inherited from MemoryItem
virtual std::string getExportName () const
 
MemoryID getMemoryID () const
 
MemoryID id () const
 
 MemoryItem (const std::string &exportName, const MemoryID &)
 
 MemoryItem (const std::string &exportName, const MemoryID &, const std::shared_ptr< Processors > &)
 
std::string name () const
 
void setExportName (const std::string &n)
 
void setMemoryID (const MemoryID &)
 
void setMemoryName (const std::string &memoryName)
 
virtual ~MemoryItem ()=default
 

Static Public Member Functions

static std::string getLevelName ()
 

Protected Member Functions

virtual std::shared_ptr< InstanceT > _implFindInstance (const int instanceId) const =0
 
virtual bool _implForEachInstance (std::function< void(InstanceT &)> func) const =0
 
virtual bool _implHasInstance (const int instanceId) const =0
 
virtual void _loadAllReferences (armem::wm::EntitySnapshot &) const =0
 
virtual void _resolve (armem::wm::EntitySnapshot &) const =0
 
virtual void _store (const armem::wm::EntitySnapshot &s)=0
 
- Protected Member Functions inherited from MemoryItem
virtual void _setExportName (const std::string &)
 
virtual void _setMemoryID (const MemoryID &)
 

Protected Attributes

Statistics statistics
 
- Protected Attributes inherited from MemoryItem
std::shared_ptr< Processorsprocessors
 

Detailed Description

template<class InstanceT>
class armarx::armem::server::ltm::detail::EntitySnapshotBase< InstanceT >

Interface functions for the longterm memory classes.

Definition at line 17 of file EntitySnapshotBase.h.

Member Function Documentation

◆ _implFindInstance()

template<class InstanceT>
virtual std::shared_ptr< InstanceT > _implFindInstance ( const int instanceId) const
protectedpure virtual

Implemented in EntitySnapshot.

+ Here is the caller graph for this function:

◆ _implForEachInstance()

template<class InstanceT>
virtual bool _implForEachInstance ( std::function< void(InstanceT &)> func) const
protectedpure virtual

Implemented in EntitySnapshot.

+ Here is the caller graph for this function:

◆ _implHasInstance()

template<class InstanceT>
virtual bool _implHasInstance ( const int instanceId) const
protectedpure virtual

Implemented in EntitySnapshot.

+ Here is the caller graph for this function:

◆ _loadAllReferences()

template<class InstanceT>
virtual void _loadAllReferences ( armem::wm::EntitySnapshot & ) const
protectedpure virtual

Implemented in EntitySnapshot.

+ Here is the caller graph for this function:

◆ _resolve()

template<class InstanceT>
virtual void _resolve ( armem::wm::EntitySnapshot & ) const
protectedpure virtual

Implemented in EntitySnapshot.

+ Here is the caller graph for this function:

◆ _store()

template<class InstanceT>
virtual void _store ( const armem::wm::EntitySnapshot & s)
protectedpure virtual

Implemented in EntitySnapshot.

+ Here is the caller graph for this function:

◆ findInstance()

template<class InstanceT>
std::shared_ptr< InstanceT > findInstance ( const int instanceId) const
inline

find Instance segment

Definition at line 85 of file EntitySnapshotBase.h.

+ Here is the call graph for this function:

◆ forEachInstance()

template<class InstanceT>
bool forEachInstance ( std::function< void(InstanceT &)> func) const
inline

iterate over all Instance segments of this ltm

Definition at line 71 of file EntitySnapshotBase.h.

+ Here is the call graph for this function:

◆ getLevelName()

template<class InstanceT>
static std::string getLevelName ( )
inlinestatic

Definition at line 64 of file EntitySnapshotBase.h.

◆ getStatistics()

template<class InstanceT>
Statistics getStatistics ( ) const
inline

Definition at line 58 of file EntitySnapshotBase.h.

◆ hasInstance()

template<class InstanceT>
bool hasInstance ( const int instanceId) const
inline

check if Instance segment exists

Definition at line 78 of file EntitySnapshotBase.h.

+ Here is the call graph for this function:

◆ loadAllReferences()

template<class InstanceT>
void loadAllReferences ( armem::wm::EntitySnapshot & e) const
inline

return the full sub-ltm as a wm::EntitySnapshot with only references the ltm may be huge, use with caution

Definition at line 31 of file EntitySnapshotBase.h.

+ Here is the call graph for this function:

◆ MemoryItem() [1/2]

template<class InstanceT>
MemoryItem ( const std::string & exportName,
const MemoryID & id )

Definition at line 16 of file MemoryItem.cpp.

◆ MemoryItem() [2/2]

template<class InstanceT>
MemoryItem ( const std::string & exportName,
const MemoryID & id,
const std::shared_ptr< Processors > & p )

Definition at line 17 of file MemoryItem.cpp.

◆ resetStatistics()

template<class InstanceT>
void resetStatistics ( )
inline

statistics

Definition at line 52 of file EntitySnapshotBase.h.

◆ resolve()

template<class InstanceT>
void resolve ( armem::wm::EntitySnapshot & e) const
inline

convert the references of the input into a wm::Memory

Definition at line 38 of file EntitySnapshotBase.h.

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

◆ store()

template<class InstanceT>
void store ( const armem::wm::EntitySnapshot & e)
inline

encode the content of a wm::Memory and store

Definition at line 45 of file EntitySnapshotBase.h.

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

Member Data Documentation

◆ statistics

template<class InstanceT>
Statistics statistics
protected

Definition at line 102 of file EntitySnapshotBase.h.


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