|
#include <MemoryX/gui-plugins/SceneEditor/memoryxcontroller/MemoryXController.h>
Public Member Functions | |
std::vector< std::string > | getAllSnapshots () |
Returns a list with the names of all existing snapshots. More... | |
controller::ControllerPtr | getController () const |
Returns the main controller of this plugin. More... | |
std::shared_ptr< PriorKnowledgeController > | getPriorKnowlegdeController () const |
Returns a shared pointer to the PriorKnowledgeController. More... | |
IceInternal::Handle< WorkingMemoryController > | getWorkingMemoryController () const |
Returns a shared pointer to the WorkingMemoryController. More... | |
void | init (const memoryx::PriorKnowledgeInterfacePrx &priorKnowledgePrx, const memoryx::WorkingMemoryInterfacePrx &workingMemoryPrx, const std::string &workingMemoryUpdatesTopic, const std::string &objectInstancesSegmentName, const memoryx::LongtermMemoryInterfacePrx &longtermMemoryPrx, const controller::ControllerPtr &mainController) |
Initialisates the MemoryXController. More... | |
std::vector< std::string > | loadSnapshot (const std::string &snapshotName) |
Loads the content of the snapshot with the given name and add it to the current working memory. More... | |
MemoryXController () | |
Constructor. More... | |
bool | saveObjectsInSnapshot (std::string &snapshotName, const std::vector< std::string > &objectIds) |
Saves all object instances whose ids are given in a snapshot with the given name. More... | |
bool | saveSceneInSnapshot (std::string &snapshotName) |
Saves the whole content of the working memory in a snapshot with the given name. More... | |
~MemoryXController () | |
Destructor. More... | |
Definition at line 51 of file MemoryXController.h.
Constructor.
Creates an instance of this class.
Definition at line 45 of file MemoryXController.cpp.
~MemoryXController | ( | ) |
Destructor.
Definition at line 50 of file MemoryXController.cpp.
std::vector< std::string > getAllSnapshots | ( | ) |
Returns a list with the names of all existing snapshots.
Definition at line 155 of file MemoryXController.cpp.
controller::ControllerPtr getController | ( | ) | const |
Returns the main controller of this plugin.
Definition at line 150 of file MemoryXController.cpp.
std::shared_ptr< memoryxcontroller::PriorKnowledgeController > getPriorKnowlegdeController | ( | ) | const |
Returns a shared pointer to the PriorKnowledgeController.
Definition at line 145 of file MemoryXController.cpp.
IceInternal::Handle< memoryxcontroller::WorkingMemoryController > getWorkingMemoryController | ( | ) | const |
Returns a shared pointer to the WorkingMemoryController.
Definition at line 140 of file MemoryXController.cpp.
void init | ( | const memoryx::PriorKnowledgeInterfacePrx & | priorKnowledgePrx, |
const memoryx::WorkingMemoryInterfacePrx & | workingMemoryPrx, | ||
const std::string & | workingMemoryUpdatesTopic, | ||
const std::string & | objectInstancesSegmentName, | ||
const memoryx::LongtermMemoryInterfacePrx & | longtermMemoryPrx, | ||
const controller::ControllerPtr & | mainController | ||
) |
Initialisates the MemoryXController.
priorKnowledgePrx | the proxy to the priorknowledge |
workingMemoryPrx | the proxy to the working memory |
workingMemoryUpdatesTopic | the name of the topic where changes of the working memory are reported |
objectInstancesSegmentName | the name of the segment in the working memory where the object instances are stored |
longtermMemoryPrx | the proxy to the longtermmemory where snapshots are stored |
mainController | the controller of this programm |
Definition at line 58 of file MemoryXController.cpp.
std::vector< std::string > loadSnapshot | ( | const std::string & | snapshotName | ) |
Loads the content of the snapshot with the given name and add it to the current working memory.
Returns a list with the ids of the added object instances. If there is no snapshot with the given name nothing is added to the working memory.
snapshotName | the name of the snapshot that should be loaded |
Definition at line 105 of file MemoryXController.cpp.
bool saveObjectsInSnapshot | ( | std::string & | snapshotName, |
const std::vector< std::string > & | objectIds | ||
) |
Saves all object instances whose ids are given in a snapshot with the given name.
snapshotName | the name of the snapshot |
objectIds | the list with the ids of the object instances that shold be saved |
Definition at line 88 of file MemoryXController.cpp.
bool saveSceneInSnapshot | ( | std::string & | snapshotName | ) |
Saves the whole content of the working memory in a snapshot with the given name.
If the given name does not start with 'Snapshot_', this prefix will be added.
snapshotName | the name of the snapshot |
Definition at line 71 of file MemoryXController.cpp.