Fawkes API
Fawkes Development Version
asp.h
1
2
/***************************************************************************
3
* asp.h - ASP aspect for Fawkes
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. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#ifndef _PLUGINS_ASP_ASPECT_ASP_H_
25
#define _PLUGINS_ASP_ASPECT_ASP_H_
26
27
#include <aspect/aspect.h>
28
#include <core/utils/lockptr.h>
29
30
#include <string>
31
32
namespace
fawkes
{
33
34
class
ClingoAccess;
35
36
class
ASPAspect
:
public
virtual
Aspect
37
{
38
public
:
39
ASPAspect
(
const
std::string &&control_name,
const
std::string &&log_component = std::string());
40
virtual
~ASPAspect
(
void
);
41
42
private
:
43
const
std::string control_name_;
44
const
std::string log_comp_;
45
46
void
init_ASPAspect(
const
LockPtr<ClingoAccess>
&
clingo
);
47
void
finalize_ASPAspect(
void
);
48
49
protected
:
50
LockPtr<ClingoAccess>
clingo
;
51
52
/** Additional access by ASPAspectIniFin
53
* @relates ASPAspectIniFin
54
*/
55
friend
class
ASPAspectIniFin
;
56
};
57
58
}
// end namespace fawkes
59
60
#endif
fawkes::LockPtr
LockPtr<> is a reference-counting shared lockable smartpointer.
Definition:
lockptr.h:55
fawkes::ASPAspectIniFin
ASPAspect initializer/finalizer.
Definition:
asp_inifin.h:37
fawkes::ASPAspect::ASPAspect
ASPAspect(const std::string &&control_name, const std::string &&log_component=std::string())
Constructor.
Definition:
asp.cpp:50
fawkes::ASPAspect
Thread aspect to get access to an ASP solver.
Definition:
asp.h:37
fawkes::ASPAspect::clingo
LockPtr< ClingoAccess > clingo
Clingo Control for exclusive usage.
Definition:
asp.h:50
fawkes
Fawkes library namespace.
fawkes::Aspect
Fawkes aspect base class.
Definition:
aspect.h:32
fawkes::ASPAspect::~ASPAspect
virtual ~ASPAspect(void)
Virtual empty destructor.
Definition:
asp.cpp:57
src
plugins
asp
aspect
asp.h
Generated by
1.8.20