Fawkes API
Fawkes Development Version
clips_thread.h
1
2
/***************************************************************************
3
* clips_thread.h - CLIPS aspect provider thread
4
*
5
* Created: Sat Jun 16 14:38:21 2012 (Mexico City)
6
* Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7
*
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_CLIPS_CLIPS_THREAD_H_
24
#define _PLUGINS_CLIPS_CLIPS_THREAD_H_
25
26
#include <aspect/aspect_provider.h>
27
#include <aspect/blackboard.h>
28
#include <aspect/clock.h>
29
#include <aspect/configurable.h>
30
#include <aspect/logging.h>
31
#include <core/threading/thread.h>
32
#include <plugins/clips/aspect/clips_feature_inifin.h>
33
#include <plugins/clips/aspect/clips_inifin.h>
34
#include <plugins/clips/aspect/clips_manager_inifin.h>
35
36
namespace
CLIPS {
37
class
Environment
;
38
}
39
namespace
fawkes
{
40
class
AspectIniFin;
41
class
CLIPSFeature;
42
}
// namespace fawkes
43
44
class
BlackboardCLIPSFeature
;
45
46
class
CLIPSThread
:
public
fawkes::Thread
,
47
public
fawkes::LoggingAspect
,
48
public
fawkes::ClockAspect
,
49
public
fawkes::ConfigurableAspect
,
50
public
fawkes::BlackBoardAspect
,
51
public
fawkes::AspectProviderAspect
52
{
53
public
:
54
CLIPSThread
();
55
virtual
~CLIPSThread
();
56
57
virtual
void
init
();
58
virtual
void
loop
();
59
virtual
void
finalize
();
60
61
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
62
protected
:
63
virtual
void
64
run
()
65
{
66
Thread::run();
67
}
68
69
private
:
70
const
std::list<fawkes::AspectIniFin *> inifin_list();
71
72
private
:
73
fawkes::CLIPSAspectIniFin
clips_aspect_inifin_;
74
fawkes::CLIPSFeatureAspectIniFin
clips_feature_aspect_inifin_;
75
fawkes::CLIPSManagerAspectIniFin
clips_manager_aspect_inifin_;
76
fawkes::LockPtr<fawkes::CLIPSEnvManager>
clips_env_mgr_;
77
78
std::list<fawkes::CLIPSFeature *> features_;
79
};
80
81
#endif
fawkes::CLIPSAspectIniFin
Definition:
clips_inifin.h:44
fawkes::LockPtr< fawkes::CLIPSEnvManager >
BlackboardCLIPSFeature
Definition:
feature_blackboard.h:45
CLIPSThread::init
virtual void init()
Initialize the thread.
Definition:
clips_thread.cpp:53
CLIPSThread
Definition:
clips_thread.h:46
CLIPSThread::~CLIPSThread
virtual ~CLIPSThread()
Destructor.
Definition:
clips_thread.cpp:48
fawkes::AspectProviderAspect
Definition:
aspect_provider.h:41
CLIPSThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
clips_thread.h:64
fawkes::BlackBoardAspect
Definition:
blackboard.h:38
fawkes
fawkes::LoggingAspect
Definition:
logging.h:38
fawkes::CLIPSFeatureAspectIniFin
Definition:
clips_feature_inifin.h:43
fawkes::CLIPSManagerAspectIniFin
Definition:
clips_manager_inifin.h:43
CLIPSThread::CLIPSThread
CLIPSThread()
Constructor.
Definition:
clips_thread.cpp:42
fawkes::Thread
Definition:
thread.h:45
fawkes::ConfigurableAspect
Definition:
configurable.h:38
CLIPSThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
clips_thread.cpp:90
CLIPSThread::finalize
virtual void finalize()
Finalize the thread.
Definition:
clips_thread.cpp:80
fawkes::ClockAspect
Definition:
clock.h:40
Environment
Environment representation for JSON transfer.
Definition:
Environment.h:26
src
plugins
clips
clips_thread.h
Generated by
1.8.17