PriorKnowledgeController Class Reference

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::ObjectClassPtrgetAllObjectClassesPtr (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PriorKnowledgeController() [1/2]

PriorKnowledgeController ( const memoryx::PriorKnowledgeInterfacePrx &  priorKnowledgePrx)

Constructor.

Constructs a new instance of this class.

Parameters
priorKnowledgePrxthe proxy to the priorknowledge where the object classes are stored

Definition at line 54 of file PriorKnowledgeController.cpp.

◆ PriorKnowledgeController() [2/2]

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.

Parameters
otherthe priorknowledgecontroller that is about to be copied

Definition at line 70 of file PriorKnowledgeController.cpp.

◆ ~PriorKnowledgeController()

Destructor.

Definition at line 80 of file PriorKnowledgeController.cpp.

Member Function Documentation

◆ getAllAttributes()

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.

Parameters
objectClassthe pointer to the given object class
Returns
std::map<std::string, std::string> the map with the attributes

Definition at line 181 of file PriorKnowledgeController.cpp.

◆ getAllObjectClassesPtr()

std::vector< memoryx::ObjectClassPtr > getAllObjectClassesPtr ( const std::string &  collection) const

Returns a list of pointers to all object classes in the given collection.

Parameters
collectionthe name of the collection
Returns
std::vector<memoryx::ObjectClassPtr> the pointers to all object classes

Definition at line 90 of file PriorKnowledgeController.cpp.

◆ getCoinVisualisation()

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.

Parameters
objectClassthe pointer to object class
collisionModeltrue if the collision model should be returned
Returns
SoNode the coin node that contains the requested visual model

Definition at line 145 of file PriorKnowledgeController.cpp.

+ Here is the call graph for this function:

◆ getCollection()

std::string getCollection ( const memoryx::ObjectInstancePtr objectInstance) const

Returns the name of the collection the object class of the given object instance belongs to.

Parameters
objectInstancethe given object instance
Returns
std::string the name of the collection the object class belongs to

Definition at line 250 of file PriorKnowledgeController.cpp.

◆ getCollectionNames()

std::vector< std::string > getCollectionNames ( ) const

Returns a list of the names of all collections in the database.

Returns
std::vector<std::string> the names of all availiable collections

Definition at line 84 of file PriorKnowledgeController.cpp.

◆ getObjectClassPtr()

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.

Parameters
classNamethe name of the object class
collectionthe name of the collection, where the object class belongs to
Returns
memoryx::ObjectClassPtr the pointer to the object class with the given name

Definition at line 124 of file PriorKnowledgeController.cpp.


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