Fawkes API
Fawkes Development Version
asp_thread.h
1
2
/***************************************************************************
3
* asp_thread.h - ASP aspect provider thread
4
*
5
* Created: Thu Oct 20 15:49:31 2016
6
* Copyright 2016 Björn Schäpers
7
* 2018 Tim Niemueller [www.niemueller.org]
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL file in the doc directory.
21
*/
22
23
#ifndef _PLUGINS_ASP_ASP_THREAD_H_
24
#define _PLUGINS_ASP_ASP_THREAD_H_
25
26
#include <aspect/aspect_provider.h>
27
#include <aspect/logging.h>
28
#include <core/threading/thread.h>
29
#include <plugins/asp/aspect/asp_inifin.h>
30
#include <plugins/asp/aspect/clingo_control_manager.h>
31
#include <plugins/asp/aspect/clingo_manager_inifin.h>
32
33
namespace
fawkes
{
34
class
AspectIniFin;
35
}
36
37
class
ASPThread
:
public
fawkes::Thread
,
38
public
fawkes::LoggingAspect
,
39
public
fawkes::AspectProviderAspect
40
{
41
public
:
42
ASPThread
();
43
44
void
init
()
override
;
45
void
loop
()
override
;
46
void
finalize
()
override
;
47
48
protected
:
49
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
50
void
51
run
()
override
52
{
53
Thread::run();
54
}
55
56
private
:
57
fawkes::ASPAspectIniFin
asp_inifin_;
58
fawkes::ClingoManagerAspectIniFin
clingo_mgr_inifin_;
59
fawkes::LockPtr<fawkes::ClingoControlManager>
control_mgr_;
60
};
61
62
#endif
fawkes::LockPtr< fawkes::ClingoControlManager >
fawkes::ASPAspectIniFin
Definition:
asp_inifin.h:40
fawkes::AspectProviderAspect
Definition:
aspect_provider.h:39
fawkes
fawkes::LoggingAspect
Definition:
logging.h:36
ASPThread
Definition:
asp_thread.h:36
ASPThread::finalize
void finalize() override
Finalize the thread.
Definition:
asp_thread.cpp:59
ASPThread::ASPThread
ASPThread()
Constructor.
Definition:
asp_thread.cpp:43
ASPThread::loop
void loop() override
Code to execute in the thread.
Definition:
asp_thread.cpp:64
fawkes::Thread
Definition:
thread.h:44
ASPThread::run
void run() override
Stub to see name in backtrace for easier debugging.
Definition:
asp_thread.h:50
fawkes::ClingoManagerAspectIniFin
Definition:
clingo_manager_inifin.h:37
ASPThread::init
void init() override
Initialize the thread.
Definition:
asp_thread.cpp:51
src
plugins
asp
asp_thread.h
Generated by
1.8.16