Fawkes API
Fawkes Development Version
|
24 #include <core/threading/thread_finalizer.h>
25 #include <logging/logger.h>
26 #include <plugins/asp/aspect/asp.h>
27 #include <plugins/asp/aspect/asp_inifin.h>
28 #include <plugins/asp/aspect/clingo_access.h>
29 #include <plugins/asp/aspect/clingo_control_manager.h>
57 if (asp_thread ==
nullptr) {
59 "but RTTI says it has not.",
63 asp_thread->init_ASPAspect(
64 ctrl_mgr_->create_control(asp_thread->control_name_, asp_thread->log_comp_));
71 if (asp_thread ==
nullptr) {
73 "but RTTI says it has not.",
77 asp_thread->finalize_ASPAspect();
LockPtr<> is a reference-counting shared lockable smartpointer.
Thread cannot be initialized.
const char * name() const
Get name of thread.
void init(Thread *thread) override
Initialize thread.
Thread aspect to get access to an ASP solver.
~ASPAspectIniFin(void)
Destructor.
Aspect initializer/finalizer base class.
Fawkes library namespace.
Thread class encapsulation of pthreads.
void finalize(Thread *thread) override
Finalize thread.
Thread cannot be finalized.
ASPAspectIniFin(void)
Constructor.
void set_control_manager(const LockPtr< ClingoControlManager > &ctrl_mgr)
Sets the control manager.