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> 56 ASPAspect *asp_thread = dynamic_cast<ASPAspect *>(thread);
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_));
70 ASPAspect *asp_thread = dynamic_cast<ASPAspect *>(thread);
71 if (asp_thread ==
nullptr) {
73 "but RTTI says it has not.",
77 asp_thread->finalize_ASPAspect();
Fawkes library namespace.
~ASPAspectIniFin(void)
Destructor.
Thread class encapsulation of pthreads.
void set_control_manager(const LockPtr< ClingoControlManager > &ctrl_mgr)
Sets the control manager.
LockPtr<> is a reference-counting shared lockable smartpointer.
Thread cannot be initialized.
const char * name() const
Get name of thread.
Thread aspect to get access to an ASP solver.
Thread cannot be finalized.
ASPAspectIniFin(void)
Constructor.
void finalize(Thread *thread) override
Finalize thread.
void init(Thread *thread) override
Initialize thread.
Aspect initializer/finalizer base class.