Fawkes API
Fawkes Development Version
|
#include <>>
Public Member Functions | |
ClingoControlManager (void) | |
Constructor. More... | |
virtual | ~ClingoControlManager (void) |
Destructor. More... | |
void | set_logger (Logger *logger) |
Sets the logger for all Clingo Controls. More... | |
LockPtr< ClingoAccess > | create_control (const std::string &ctrl_name, const std::string &log_component_name) |
Create a new control. More... | |
void | destroy_control (const std::string &ctrl_name) |
"Destroys" the named control. More... | |
const std::unordered_map< std::string, LockPtr< ClingoAccess > > & | controls (void) const |
Get map of controls. More... | |
The Clingo Control Manager creates and maintains Clingo Controls.
Definition at line 41 of file clingo_control_manager.h.
fawkes::ClingoControlManager::ClingoControlManager | ( | void | ) |
Constructor.
Definition at line 42 of file clingo_control_manager.cpp.
|
virtual |
Destructor.
Definition at line 47 of file clingo_control_manager.cpp.
const std::unordered_map< std::string, LockPtr< ClingoAccess > > & fawkes::ClingoControlManager::controls | ( | void | ) | const |
Get map of controls.
Definition at line 102 of file clingo_control_manager.cpp.
LockPtr< ClingoAccess > fawkes::ClingoControlManager::create_control | ( | const std::string & | ctrl_name, |
const std::string & | log_component_name | ||
) |
Create a new control.
The control is registered internally under the specified name. It must be destroyed when done with it. Only a single control can be created for a particular control name.
[in] | ctrl_name | The Name by which to register the control. |
[in] | log_component_name | The Prefix for log entries. If empty it will be set to "Clingo". |
Definition at line 70 of file clingo_control_manager.cpp.
void fawkes::ClingoControlManager::destroy_control | ( | const std::string & | ctrl_name | ) |
"Destroys" the named control.
Only ever destroy controls which you have created yourself. It will be unregistered, but live as long as there is a LockPtr reference to it.
[in] | ctrl_name | The name of the control to destroy. |
Definition at line 91 of file clingo_control_manager.cpp.
void fawkes::ClingoControlManager::set_logger | ( | Logger * | logger | ) |
Sets the logger for all Clingo Controls.
[in] | logger | The logger. |
Definition at line 56 of file clingo_control_manager.cpp.
Referenced by ASPThread::init().