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

std::shared_ptr< EntitySnapshotTfindFirstSnapshotAfter (const Time &time) const
 
std::shared_ptr< EntitySnapshotTfindFirstSnapshotAfterOrAt (const Time &time) const
 
std::shared_ptr< EntitySnapshotTfindLatestSnapshot () const
 
std::shared_ptr< EntitySnapshotTfindLatestSnapshotBefore (const Time &time) const
 
std::shared_ptr< EntitySnapshotTfindLatestSnapshotBeforeOrAt (const Time &time) const
 
std::shared_ptr< EntitySnapshotTfindSnapshot (const Time &time) const
 find entity snapshot segment
 
bool forEachSnapshot (std::function< void(EntitySnapshotT &)> func) const
 iterate over all entity snapshots of this ltm
 
bool forEachSnapshotBefore (const Time &time, std::function< void(EntitySnapshotT &)> func) const
 
bool forEachSnapshotBeforeOrAt (const Time &time, std::function< void(EntitySnapshotT &)> func) const
 
bool forEachSnapshotBeforeReverse (const Time &time, std::function< bool(EntitySnapshotT &)> func) const
 
bool forEachSnapshotInIndexRange (long first, long last, std::function< void(EntitySnapshotT &)> func) const
 
bool forEachSnapshotInTimeRange (const Time &min, const Time &max, std::function< void(EntitySnapshotT &)> func) const
 
Statistics getStatistics () const
 
bool hasSnapshot (const Time &time) const
 check if snapshot segment exists
 
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
 
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
 
void resolve (armem::wm::Entity &e)
 convert the references of the input into a wm::Memory
 
void store (const armem::wm::Entity &e, bool simulatedVersion)
 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< EntitySnapshotT_implFindFirstSnapshotAfter (const Time &time) const =0
 
virtual std::shared_ptr< EntitySnapshotT_implFindFirstSnapshotAfterOrAt (const Time &time) const =0
 
virtual std::shared_ptr< EntitySnapshotT_implFindLatestSnapshot () const =0
 
virtual std::shared_ptr< EntitySnapshotT_implFindLatestSnapshotBefore (const Time &time) const =0
 
virtual std::shared_ptr< EntitySnapshotT_implFindLatestSnapshotBeforeOrAt (const Time &time) const =0
 
virtual std::shared_ptr< EntitySnapshotT_implFindSnapshot (const Time &) const =0
 
virtual bool _implForEachSnapshot (std::function< void(EntitySnapshotT &)> func) const =0
 
virtual bool _implForEachSnapshotBefore (const Time &time, std::function< void(EntitySnapshotT &)> func) const =0
 
virtual bool _implForEachSnapshotBeforeOrAt (const Time &time, std::function< void(EntitySnapshotT &)> func) const =0
 
virtual bool _implForEachSnapshotBeforeReverse (const Time &time, std::function< bool(EntitySnapshotT &)> func) const =0
 
virtual bool _implForEachSnapshotInIndexRange (long first, long last, std::function< void(EntitySnapshotT &)> func) const =0
 
virtual bool _implForEachSnapshotInTimeRange (const Time &min, const Time &max, std::function< void(EntitySnapshotT &)> func) const =0
 
virtual bool _implHasSnapshot (const Time &) const =0
 
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 &e, bool simulatedVersion=false)=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 _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

template<class _EntitySnapshotT>
using EntitySnapshotT = _EntitySnapshotT

Definition at line 26 of file EntityBase.h.

Member Function Documentation

◆ _implFindFirstSnapshotAfter()

template<class _EntitySnapshotT>
virtual std::shared_ptr< EntitySnapshotT > _implFindFirstSnapshotAfter ( const Time & time) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implFindFirstSnapshotAfterOrAt()

template<class _EntitySnapshotT>
virtual std::shared_ptr< EntitySnapshotT > _implFindFirstSnapshotAfterOrAt ( const Time & time) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implFindLatestSnapshot()

template<class _EntitySnapshotT>
virtual std::shared_ptr< EntitySnapshotT > _implFindLatestSnapshot ( ) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implFindLatestSnapshotBefore()

template<class _EntitySnapshotT>
virtual std::shared_ptr< EntitySnapshotT > _implFindLatestSnapshotBefore ( const Time & time) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implFindLatestSnapshotBeforeOrAt()

template<class _EntitySnapshotT>
virtual std::shared_ptr< EntitySnapshotT > _implFindLatestSnapshotBeforeOrAt ( const Time & time) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implFindSnapshot()

template<class _EntitySnapshotT>
virtual std::shared_ptr< EntitySnapshotT > _implFindSnapshot ( const Time & ) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implForEachSnapshot()

template<class _EntitySnapshotT>
virtual bool _implForEachSnapshot ( std::function< void(EntitySnapshotT &)> func) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implForEachSnapshotBefore()

template<class _EntitySnapshotT>
virtual bool _implForEachSnapshotBefore ( const Time & time,
std::function< void(EntitySnapshotT &)> func ) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implForEachSnapshotBeforeOrAt()

template<class _EntitySnapshotT>
virtual bool _implForEachSnapshotBeforeOrAt ( const Time & time,
std::function< void(EntitySnapshotT &)> func ) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implForEachSnapshotBeforeReverse()

template<class _EntitySnapshotT>
virtual bool _implForEachSnapshotBeforeReverse ( const Time & time,
std::function< bool(EntitySnapshotT &)> func ) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implForEachSnapshotInIndexRange()

template<class _EntitySnapshotT>
virtual bool _implForEachSnapshotInIndexRange ( long first,
long last,
std::function< void(EntitySnapshotT &)> func ) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _implForEachSnapshotInTimeRange()

template<class _EntitySnapshotT>
virtual bool _implForEachSnapshotInTimeRange ( const Time & min,
const Time & max,
std::function< void(EntitySnapshotT &)> func ) const
protectedpure virtual

Implemented in Entity.

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

◆ _implHasSnapshot()

template<class _EntitySnapshotT>
virtual bool _implHasSnapshot ( const Time & ) const
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _loadAllReferences()

template<class _EntitySnapshotT>
virtual void _loadAllReferences ( armem::wm::Entity & )
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _loadLatestNReferences()

template<class _EntitySnapshotT>
virtual void _loadLatestNReferences ( int n,
armem::wm::Entity & e )
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _resolve()

template<class _EntitySnapshotT>
virtual void _resolve ( armem::wm::Entity & )
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ _store()

template<class _EntitySnapshotT>
virtual void _store ( const armem::wm::Entity & e,
bool simulatedVersion = false )
protectedpure virtual

Implemented in Entity.

+ Here is the caller graph for this function:

◆ findFirstSnapshotAfter()

template<class _EntitySnapshotT>
std::shared_ptr< EntitySnapshotT > findFirstSnapshotAfter ( const Time & time) const
inline

Definition at line 148 of file EntityBase.h.

+ Here is the call graph for this function:

◆ findFirstSnapshotAfterOrAt()

template<class _EntitySnapshotT>
std::shared_ptr< EntitySnapshotT > findFirstSnapshotAfterOrAt ( const Time & time) const
inline

Definition at line 154 of file EntityBase.h.

+ Here is the call graph for this function:

◆ findLatestSnapshot()

template<class _EntitySnapshotT>
std::shared_ptr< EntitySnapshotT > findLatestSnapshot ( ) const
inline

Definition at line 130 of file EntityBase.h.

+ Here is the call graph for this function:

◆ findLatestSnapshotBefore()

template<class _EntitySnapshotT>
std::shared_ptr< EntitySnapshotT > findLatestSnapshotBefore ( const Time & time) const
inline

Definition at line 136 of file EntityBase.h.

+ Here is the call graph for this function:

◆ findLatestSnapshotBeforeOrAt()

template<class _EntitySnapshotT>
std::shared_ptr< EntitySnapshotT > findLatestSnapshotBeforeOrAt ( const Time & time) const
inline

Definition at line 142 of file EntityBase.h.

+ Here is the call graph for this function:

◆ findSnapshot()

template<class _EntitySnapshotT>
std::shared_ptr< EntitySnapshotT > findSnapshot ( const Time & time) const
inline

find entity snapshot segment

Definition at line 124 of file EntityBase.h.

+ Here is the call graph for this function:

◆ forEachSnapshot()

template<class _EntitySnapshotT>
bool forEachSnapshot ( std::function< void(EntitySnapshotT &)> func) const
inline

iterate over all entity snapshots of this ltm

Definition at line 73 of file EntityBase.h.

+ Here is the call graph for this function:

◆ forEachSnapshotBefore()

template<class _EntitySnapshotT>
bool forEachSnapshotBefore ( const Time & time,
std::function< void(EntitySnapshotT &)> func ) const
inline

Definition at line 102 of file EntityBase.h.

+ Here is the call graph for this function:

◆ forEachSnapshotBeforeOrAt()

template<class _EntitySnapshotT>
bool forEachSnapshotBeforeOrAt ( const Time & time,
std::function< void(EntitySnapshotT &)> func ) const
inline

Definition at line 95 of file EntityBase.h.

+ Here is the call graph for this function:

◆ forEachSnapshotBeforeReverse()

template<class _EntitySnapshotT>
bool forEachSnapshotBeforeReverse ( const Time & time,
std::function< bool(EntitySnapshotT &)> func ) const
inline

Definition at line 109 of file EntityBase.h.

+ Here is the call graph for this function:

◆ forEachSnapshotInIndexRange()

template<class _EntitySnapshotT>
bool forEachSnapshotInIndexRange ( long first,
long last,
std::function< void(EntitySnapshotT &)> func ) const
inline

Definition at line 79 of file EntityBase.h.

+ Here is the call graph for this function:

◆ forEachSnapshotInTimeRange()

template<class _EntitySnapshotT>
bool forEachSnapshotInTimeRange ( const Time & min,
const Time & max,
std::function< void(EntitySnapshotT &)> func ) const
inline

Definition at line 87 of file EntityBase.h.

+ Here is the call graph for this function:

◆ getLevelName()

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

Definition at line 160 of file EntityBase.h.

◆ getStatistics()

template<class _EntitySnapshotT>
Statistics getStatistics ( ) const
inline

Definition at line 66 of file EntityBase.h.

◆ hasSnapshot()

template<class _EntitySnapshotT>
bool hasSnapshot ( const Time & time) const
inline

check if snapshot segment exists

Definition at line 117 of file EntityBase.h.

+ Here is the call graph for this function:

◆ loadAllReferences()

template<class _EntitySnapshotT>
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.

+ Here is the call graph for this function:

◆ loadLatestNReferences()

template<class _EntitySnapshotT>
void loadLatestNReferences ( int n,
armem::wm::Entity & e )
inline

Definition at line 39 of file EntityBase.h.

+ Here is the call graph for this function:

◆ MemoryItem() [1/2]

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

Definition at line 16 of file MemoryItem.cpp.

◆ MemoryItem() [2/2]

template<class _EntitySnapshotT>
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 _EntitySnapshotT>
void resetStatistics ( )
inline

statistics

Definition at line 60 of file EntityBase.h.

◆ resolve()

template<class _EntitySnapshotT>
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.

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

◆ store()

template<class _EntitySnapshotT>
void store ( const armem::wm::Entity & e,
bool simulatedVersion )
inline

encode the content of a wm::Memory and store

Definition at line 53 of file EntityBase.h.

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

Member Data Documentation

◆ statistics

template<class _EntitySnapshotT>
Statistics statistics
protected

Definition at line 206 of file EntityBase.h.


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