EntityInstanceBase Class Referenceabstract

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

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

+ Inheritance diagram for EntityInstanceBase:

Classes

struct  Statistics
 

Public Member Functions

Statistics getStatistics () const
 
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 More...
 
 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::EntityInstance &e) const
 convert the references of the input into a wm::Memory More...
 
nlohmann::json store (const armem::wm::EntityInstance &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::EntitySnapshot &) const =0
 
virtual void _resolve (armem::wm::EntityInstance &) const =0
 
virtual nlohmann::json _store (const armem::wm::EntityInstance &)=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

Interface functions for the longterm memory classes.

Definition at line 15 of file EntityInstanceBase.h.

Member Function Documentation

◆ _loadAllReferences()

virtual void _loadAllReferences ( armem::wm::EntitySnapshot ) const
protectedpure virtual

Implemented in EntityInstance.

+ Here is the caller graph for this function:

◆ _resolve()

virtual void _resolve ( armem::wm::EntityInstance ) const
protectedpure virtual

Implemented in EntityInstance.

+ Here is the caller graph for this function:

◆ _store()

virtual nlohmann::json _store ( const armem::wm::EntityInstance )
protectedpure virtual

Implemented in EntityInstance.

+ Here is the caller graph for this function:

◆ getLevelName()

std::string getLevelName ( )
static

Definition at line 11 of file EntityInstanceBase.cpp.

◆ getStatistics()

Statistics getStatistics ( ) const
inline

Definition at line 58 of file EntityInstanceBase.h.

◆ loadAllReferences()

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 30 of file EntityInstanceBase.h.

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

◆ 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 51 of file EntityInstanceBase.h.

◆ resolve()

void resolve ( armem::wm::EntityInstance e) const
inline

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

Definition at line 37 of file EntityInstanceBase.h.

+ Here is the call graph for this function:

◆ store()

nlohmann::json store ( const armem::wm::EntityInstance e)
inline

encode the content of a wm::Memory and store

Definition at line 44 of file EntityInstanceBase.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ ltm_mutex

std::recursive_mutex ltm_mutex
mutableprotected

Definition at line 71 of file EntityInstanceBase.h.

◆ statistics

Statistics statistics
protected

Definition at line 73 of file EntityInstanceBase.h.


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