EntitySnapshot Class Reference

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

+ Inheritance diagram for EntitySnapshot:

Public Member Functions

 EntitySnapshot (const std::string &exportName, const MemoryID &memoryId, const std::shared_ptr< Processors > &filters, const std::shared_ptr< persistence::MemoryPersistenceStrategy > &persistenceStrategy)
 
- Public Member Functions inherited from EntitySnapshotBase< EntityInstance >
std::shared_ptr< EntityInstancefindInstance (const int instanceId) const
 find Instance segment
 
bool forEachInstance (std::function< void(EntityInstance &)> 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 &)
 
 MemoryItem (const std::string &exportName, const MemoryID &, const std::shared_ptr< Processors > &)
 
 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
 

Protected Member Functions

std::shared_ptr< EntityInstance_implFindInstance (const int entityInstanceIndex) const override
 
bool _implForEachInstance (std::function< void(EntityInstance &)> func) const override
 
bool _implHasInstance (const int entityInstanceIndex) const override
 
void _loadAllReferences (armem::wm::EntitySnapshot &wmEntitySnapshot) const override
 
void _resolve (armem::wm::EntitySnapshot &wmEntitySnapshot) const override
 
void _store (const armem::wm::EntitySnapshot &wmEntitySnapshot) override
 
- Protected Member Functions inherited from MemoryItem
virtual void _setExportName (const std::string &)
 
virtual void _setMemoryID (const MemoryID &)
 

Additional Inherited Members

- Static Public Member Functions inherited from EntitySnapshotBase< EntityInstance >
static std::string getLevelName ()
 
- Protected Attributes inherited from EntitySnapshotBase< EntityInstance >
Statistics statistics
 
- Protected Attributes inherited from MemoryItem
std::shared_ptr< Processorsprocessors
 

Detailed Description

Definition at line 14 of file EntitySnapshot.h.

Constructor & Destructor Documentation

◆ EntitySnapshot()

EntitySnapshot ( const std::string & exportName,
const MemoryID & memoryId,
const std::shared_ptr< Processors > & filters,
const std::shared_ptr< persistence::MemoryPersistenceStrategy > & persistenceStrategy )

Definition at line 15 of file EntitySnapshot.cpp.

Member Function Documentation

◆ _implFindInstance()

std::shared_ptr< EntityInstance > _implFindInstance ( const int entityInstanceIndex) const
overrideprotectedvirtual

Implements EntitySnapshotBase< EntityInstance >.

Definition at line 55 of file EntitySnapshot.cpp.

+ Here is the call graph for this function:

◆ _implForEachInstance()

bool _implForEachInstance ( std::function< void(EntityInstance &)> func) const
overrideprotectedvirtual

Implements EntitySnapshotBase< EntityInstance >.

Definition at line 25 of file EntitySnapshot.cpp.

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

◆ _implHasInstance()

bool _implHasInstance ( const int entityInstanceIndex) const
overrideprotectedvirtual

Implements EntitySnapshotBase< EntityInstance >.

Definition at line 47 of file EntitySnapshot.cpp.

+ Here is the caller graph for this function:

◆ _loadAllReferences()

void _loadAllReferences ( armem::wm::EntitySnapshot & wmEntitySnapshot) const
overrideprotectedvirtual

Implements EntitySnapshotBase< EntityInstance >.

Definition at line 71 of file EntitySnapshot.cpp.

+ Here is the call graph for this function:

◆ _resolve()

void _resolve ( armem::wm::EntitySnapshot & wmEntitySnapshot) const
overrideprotectedvirtual

Implements EntitySnapshotBase< EntityInstance >.

Definition at line 82 of file EntitySnapshot.cpp.

+ Here is the call graph for this function:

◆ _store()

void _store ( const armem::wm::EntitySnapshot & wmEntitySnapshot)
overrideprotectedvirtual

Implements EntitySnapshotBase< EntityInstance >.

Definition at line 111 of file EntitySnapshot.cpp.

+ Here is the call graph for this function:

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