ManagerClient Class
The ManagerClient class provides an abstraction for ontologenius manage service. More...
Header: | #include "ontologenius/clients/ManagerClient.h" |
Inherits: | ClientBase |
Inherited By: | OntologiesManipulator |
Namespace: | onto |
Public Functions
ManagerClient() | |
std::vector<std::string> | list() |
bool | add(const std::string& name) |
bool | copy(const std::string& dest_name, const std::string& src_name) |
bool | del(const std::string& name) |
std::vector<std::string> | getDifference(const std::string& onto_1, const std::string& onto_2, const std::string& concept) |
Reimplemented Public Functions
- 2 public functions inherited from ClientBase
Detailed Description
The ManagerClient class provides an abstraction ontologenius manage ROS services.
The manager client is used to manage ontology instances in multi-ontology usage. This makes it possible to start new ontologies or to stop old ones, but also to study the differences of knowledge between several instances. With the manager client, it is easy to develop software using theory of mind.
This class is based on ClientBase and so ensure a persistent connection with the service based on. The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.
Public Function Documentation
ManagerClient::ManagerClient()
Constructs a manager client.
Can only be used in a multi-ontology mode.
std::vector<std::string> ManagerClient::list()
Returns the name of the instantiated ontologies.
bool ManagerClient::add(const std::string& name)
Creates an ontology instance named name.
Returns false if the service call fails.
bool ManagerClient::copy(const std::string& dest_name, const std::string& src_name)
Creates a copy of the ontology instance named src_name with the name dest_name.
Returns false if the service call fails or if the copy fails.
bool ManagerClient::del(const std::string& name)
Deletes the instance of the ontology named name
Returns false if the service call fails.
std::vector<std::string> ManagerClient::getDifference(const std::string& onto_1, const std::string& onto_2, const std::string& concept)
Returns the difference of knowledge between onto_1 and onto_2 regarding the concept (class or individual) concept.
The elements of the returned vector are formated as : [+]concept_from|property|concept_on OR [-]concept_from|property|concept_on. An element is positive if it is present in onto_1 and not in onto_2 and negative in reverse.
The difference in inheritance knowledge between concepts is returned with the property isA.