|
The controller for the communication with the priorknowledge. More...
#include <MemoryX/gui-plugins/SceneEditor/memoryxcontroller/PriorKnowledgeController.h>
Public Member Functions | |
std::map< std::string, std::string > | getAllAttributes (const memoryx::ObjectClassPtr &objectClass) const |
Returns a map with every attribute and its value of the given object class. More... | |
std::vector< memoryx::ObjectClassPtr > | getAllObjectClassesPtr (const std::string &collection) const |
Returns a list of pointers to all object classes in the given collection. More... | |
SoNode * | getCoinVisualisation (const memoryx::ObjectClassPtr &objectClass, const bool &collisionModel) const |
Returns a coin node that contains a visual model of the given object class. More... | |
std::string | getCollection (const memoryx::ObjectInstancePtr &objectInstance) const |
Returns the name of the collection the object class of the given object instance belongs to. More... | |
std::vector< std::string > | getCollectionNames () const |
Returns a list of the names of all collections in the database. More... | |
memoryx::ObjectClassPtr | getObjectClassPtr (const std::string &className, const std::string &collection) const |
Returns a pointer to the object class with the given name in the give collection. More... | |
PriorKnowledgeController (const memoryx::PriorKnowledgeInterfacePrx &priorKnowledgePrx) | |
Constructor. More... | |
PriorKnowledgeController (const PriorKnowledgeController &other) | |
Copy-constructor. More... | |
~PriorKnowledgeController () | |
Destructor. More... | |
The controller for the communication with the priorknowledge.
This class provides methods to get information from the priorknowledge. It is not possible to change the content of the priorknowledge.
Definition at line 55 of file PriorKnowledgeController.h.
PriorKnowledgeController | ( | const memoryx::PriorKnowledgeInterfacePrx & | priorKnowledgePrx | ) |
Constructor.
Constructs a new instance of this class.
priorKnowledgePrx | the proxy to the priorknowledge where the object classes are stored |
Definition at line 54 of file PriorKnowledgeController.cpp.
PriorKnowledgeController | ( | const PriorKnowledgeController & | other | ) |
Copy-constructor.
This constructor can be used if a copy of the given PriorknowledgeController is needed. It prevents that problems with mutex:scoped_lock occure.
other | the priorknowledgecontroller that is about to be copied |
Definition at line 70 of file PriorKnowledgeController.cpp.
Destructor.
Definition at line 80 of file PriorKnowledgeController.cpp.
std::map< std::string, std::string > getAllAttributes | ( | const memoryx::ObjectClassPtr & | objectClass | ) | const |
Returns a map with every attribute and its value of the given object class.
The values of the attributes are partially converted in strings that are easy to display.
objectClass | the pointer to the given object class |
Definition at line 181 of file PriorKnowledgeController.cpp.
std::vector< memoryx::ObjectClassPtr > getAllObjectClassesPtr | ( | const std::string & | collection | ) | const |
Returns a list of pointers to all object classes in the given collection.
collection | the name of the collection |
Definition at line 90 of file PriorKnowledgeController.cpp.
SoNode * getCoinVisualisation | ( | const memoryx::ObjectClassPtr & | objectClass, |
const bool & | collisionModel | ||
) | const |
Returns a coin node that contains a visual model of the given object class.
If the parameter collisionModel is true, the a collision model of the object class is returned, otherwise its visualisation model.
objectClass | the pointer to object class |
collisionModel | true if the collision model should be returned |
Definition at line 145 of file PriorKnowledgeController.cpp.
std::string getCollection | ( | const memoryx::ObjectInstancePtr & | objectInstance | ) | const |
Returns the name of the collection the object class of the given object instance belongs to.
objectInstance | the given object instance |
Definition at line 250 of file PriorKnowledgeController.cpp.
std::vector< std::string > getCollectionNames | ( | ) | const |
Returns a list of the names of all collections in the database.
Definition at line 84 of file PriorKnowledgeController.cpp.
memoryx::ObjectClassPtr getObjectClassPtr | ( | const std::string & | className, |
const std::string & | collection | ||
) | const |
Returns a pointer to the object class with the given name in the give collection.
If there is no object class with the given name, a null pointer is returned.
className | the name of the object class |
collection | the name of the collection, where the object class belongs to |
Definition at line 124 of file PriorKnowledgeController.cpp.