OntologiesManipulator Class
The OntologiesManipulator class is an interface to manage several instance of OntologyManipulator and OntologyIndexManipulator in a multi-ontology usage. More...
Header: | #include "ontologenius/OntologiesManipulator.h" |
Inherits: | ManagerClient |
Namespace: | onto |
Public Functions
OntologiesManipulator() | |
waitInit(int32_t timeout = -1) | |
OntologyManipulator* | operator[](const std::string& name) |
OntologyManipulator* | get(const std::string& name) |
OntologyIndexManipulator* | getIndex(const std::string& name) |
verbose(bool verbose) |
Reimplemented Public Functions
bool | add(const std::string& name) |
bool | copy(const std::string& dest_name, const std::string& src_name) |
bool | del(const std::string& name) |
- 2 public functions inherited from ManagerClient
Detailed Description
The OntologiesManipulator class allows to create and delete ontologies instances dynamically. Its usage is strongly recommended for multi-ontology usage and ensures good thread management.
This class allows you to set up the theory of mind quickly in a software application.
Public Function Documentation
OntologiesManipulator::OntologiesManipulator()
Constructs a manipulator for several instance of ontologies.
OntologiesManipulator::waitInit(int32_t timeout = -1)
Wait for ontologenius services to be advertised and available for. Blocks until it is.
timeout is the amount of time to wait for before timing out. If timeout is -1 (default), waits until the node is shutdown.
OntologyManipulator* OntologiesManipulator::operator[](const std::string& name)
Returns a pointer on the OntologyManipulator instance named name.
Returns nullptr if no OntologyManipulator instance is named name.
OntologyManipulator* OntologiesManipulator::get(const std::string& name)
Returns a pointer on the OntologyManipulator instance named name.
Returns nullptr if no OntologyManipulator instance is named name.
OntologyIndexManipulator* OntologiesManipulator::getIndex(const std::string& name)
Returns a pointer on the OntologyIndexManipulator instance named name.
Returns nullptr if no OntologyIndexManipulator instance is named name.
bool OntologiesManipulator::add(const std::string& name)
Creates a new instance of ontologyManipulator and OntologyIndexManipulator identified by the name name.
Returns false if the creation fails. Returns true even if the instance already exists.
bool OntologiesManipulator::copy(const std::string& dest_name, const std::string& src_name)
Creates a new instance of ontologyManipulator and OntologyIndexManipulator identified by the name dest_name that manipulates a copy of the ontology handled by the ontologyManipulator src_name.
Returns false if the copy fails. Returns true even if the instance already exists.
bool OntologiesManipulator::del(const std::string& name)
Deletes the instance of ontologyManipulator and OntologyIndexManipulator identified by the name name.
Returns false deletion fails. Returns true even if the instance does not exist.
OntologiesManipulator::verbose(bool verbose)
If verbose is set to true, the clients will post messages about the failure to call the services and about their restoration.