EntityBase< _EntitySnapshotT > Class Template Referenceabstract

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

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

+ Inheritance diagram for EntityBase< _EntitySnapshotT >:

Classes

struct  Statistics
 

Public Types

using EntitySnapshotT = _EntitySnapshotT
 

Public Member Functions

virtual std::shared_ptr< EntitySnapshotTfindFirstSnapshotAfter (const Time &time) const =0
 
virtual std::shared_ptr< EntitySnapshotTfindFirstSnapshotAfterOrAt (const Time &time) const =0
 
virtual std::shared_ptr< EntitySnapshotTfindLatestSnapshot () const =0
 
virtual std::shared_ptr< EntitySnapshotTfindLatestSnapshotBefore (const Time &time) const =0
 
virtual std::shared_ptr< EntitySnapshotTfindLatestSnapshotBeforeOrAt (const Time &time) const =0
 
virtual std::shared_ptr< EntitySnapshotTfindSnapshot (const Time &) const =0
 find entity snapshot segment More...
 
virtual bool forEachSnapshot (std::function< void(EntitySnapshotT &)> func) const =0
 iterate over all entity snapshots of this ltm More...
 
virtual bool forEachSnapshotBefore (const Time &time, std::function< void(EntitySnapshotT &)> func) const =0
 
virtual bool forEachSnapshotBeforeOrAt (const Time &time, std::function< void(EntitySnapshotT &)> func) const =0
 
virtual bool forEachSnapshotInIndexRange (long first, long last, std::function< void(EntitySnapshotT &)> func) const =0
 
virtual bool forEachSnapshotInTimeRange (const Time &min, const Time &max, std::function< void(EntitySnapshotT &)> func) const =0
 
Statistics getStatistics () const
 
virtual bool hasSnapshot (const Time &) const =0
 check if snapshot segment exists More...
 
void loadAllReferences (armem::wm::Entity &e)
 return the full sub-ltm as a wm::Entity with only references the ltm may be huge, use with caution More...
 
void loadLatestNReferences (int n, armem::wm::Entity &e)
 
 MemoryItem (const std::string &exportName, const MemoryID &)
 
 MemoryItem (const std::string &exportName, const MemoryID &, const std::shared_ptr< Processors > &)
 
void resetStatistics ()
 statistics More...
 
void resolve (armem::wm::Entity &e)
 convert the references of the input into a wm::Memory More...
 
void store (const armem::wm::Entity &e)
 encode the content of a wm::Memory and store More...
 
- 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 void _loadAllReferences (armem::wm::Entity &)=0
 
virtual void _loadLatestNReferences (int n, armem::wm::Entity &e)=0
 
virtual void _resolve (armem::wm::Entity &)=0
 
virtual void _store (const armem::wm::Entity &)=0
 
- Protected Member Functions inherited from MemoryItem
virtual void _setExportName (const std::string &)
 
virtual void _setMemoryID (const MemoryID &)
 

Protected Attributes

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

Detailed Description

template<class _EntitySnapshotT>
class armarx::armem::server::ltm::detail::EntityBase< _EntitySnapshotT >

Interface functions for the longterm memory classes.

Definition at line 17 of file EntityBase.h.

Member Typedef Documentation

◆ EntitySnapshotT

using EntitySnapshotT = _EntitySnapshotT

Definition at line 26 of file EntityBase.h.

Member Function Documentation

◆ _loadAllReferences()

virtual void _loadAllReferences ( armem::wm::Entity )
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _loadLatestNReferences()

virtual void _loadLatestNReferences ( int  n,
armem::wm::Entity e 
)
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _resolve()

virtual void _resolve ( armem::wm::Entity )
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _store()

virtual void _store ( const armem::wm::Entity )
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ findFirstSnapshotAfter()

virtual std::shared_ptr<EntitySnapshotT> findFirstSnapshotAfter ( const Time time) const
pure virtual

Implemented in Entity.

◆ findFirstSnapshotAfterOrAt()

virtual std::shared_ptr<EntitySnapshotT> findFirstSnapshotAfterOrAt ( const Time time) const
pure virtual

Implemented in Entity.

◆ findLatestSnapshot()

virtual std::shared_ptr<EntitySnapshotT> findLatestSnapshot ( ) const
pure virtual

◆ findLatestSnapshotBefore()

virtual std::shared_ptr<EntitySnapshotT> findLatestSnapshotBefore ( const Time time) const
pure virtual

Implemented in Entity.

◆ findLatestSnapshotBeforeOrAt()

virtual std::shared_ptr<EntitySnapshotT> findLatestSnapshotBeforeOrAt ( const Time time) const
pure virtual

Implemented in Entity.

◆ findSnapshot()

virtual std::shared_ptr<EntitySnapshotT> findSnapshot ( const Time ) const
pure virtual

find entity snapshot segment

Implemented in Entity.

◆ forEachSnapshot()

virtual bool forEachSnapshot ( std::function< void(EntitySnapshotT &)>  func) const
pure virtual

iterate over all entity snapshots of this ltm

Implemented in Entity.

◆ forEachSnapshotBefore()

virtual bool forEachSnapshotBefore ( const Time time,
std::function< void(EntitySnapshotT &)>  func 
) const
pure virtual

Implemented in Entity.

◆ forEachSnapshotBeforeOrAt()

virtual bool forEachSnapshotBeforeOrAt ( const Time time,
std::function< void(EntitySnapshotT &)>  func 
) const
pure virtual

Implemented in Entity.

◆ forEachSnapshotInIndexRange()

virtual bool forEachSnapshotInIndexRange ( long  first,
long  last,
std::function< void(EntitySnapshotT &)>  func 
) const
pure virtual

Implemented in Entity.

◆ forEachSnapshotInTimeRange()

virtual bool forEachSnapshotInTimeRange ( const Time min,
const Time max,
std::function< void(EntitySnapshotT &)>  func 
) const
pure virtual

Implemented in Entity.

◆ getLevelName()

static std::string getLevelName ( )
inlinestatic

Definition at line 102 of file EntityBase.h.

◆ getStatistics()

Statistics getStatistics ( ) const
inline

Definition at line 66 of file EntityBase.h.

◆ hasSnapshot()

virtual bool hasSnapshot ( const Time ) const
pure virtual

check if snapshot segment exists

Implemented in Entity.

◆ loadAllReferences()

void loadAllReferences ( armem::wm::Entity e)
inline

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

Definition at line 33 of file EntityBase.h.

◆ loadLatestNReferences()

void loadLatestNReferences ( int  n,
armem::wm::Entity e 
)
inline

Definition at line 39 of file EntityBase.h.

◆ MemoryItem() [1/2]

Definition at line 10 of file MemoryItem.cpp.

◆ MemoryItem() [2/2]

Definition at line 15 of file MemoryItem.cpp.

◆ resetStatistics()

void resetStatistics ( )
inline

statistics

Definition at line 60 of file EntityBase.h.

◆ resolve()

void resolve ( armem::wm::Entity e)
inline

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

Definition at line 46 of file EntityBase.h.

◆ store()

void store ( const armem::wm::Entity e)
inline

encode the content of a wm::Memory and store

Definition at line 53 of file EntityBase.h.

Member Data Documentation

◆ ltm_mutex

std::recursive_mutex ltm_mutex
mutableprotected

Definition at line 114 of file EntityBase.h.

◆ statistics

Statistics statistics
protected

Definition at line 116 of file EntityBase.h.


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