Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
clips.cpp
1
2
/***************************************************************************
3
* clips.cpp - CLIPS aspect for Fawkes
4
*
5
* Created: Sat Jun 16 14:30:44 2012
6
* Copyright 2006-2012 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. 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
#include <plugins/clips/aspect/clips.h>
25
#include <clipsmm.h>
26
27
namespace
fawkes {
28
#if 0
/* just to make Emacs auto-indent happy */
29
}
30
#endif
31
32
/** @class CLIPSAspect <plugins/clips/aspect/clips.h>
33
* Thread aspect to get access to a CLIPS environment.
34
* Give this aspect to your thread to get a CLIPS environment for exclusive
35
* usage.
36
*
37
* @ingroup Aspects
38
* @author Tim Niemueller
39
*/
40
41
/** @var fawkes:LockPtr<CLIPS::Environment> CLIPSAspect::clips
42
* CLIPS environment for exclusive usage.
43
*/
44
45
/** Constructor. */
46
CLIPSAspect::CLIPSAspect()
47
{
48
add_aspect(
"CLIPSAspect"
);
49
}
50
51
52
/** Virtual empty destructor. */
53
CLIPSAspect::~CLIPSAspect()
54
{
55
}
56
57
58
/** Init CLIPS aspect.
59
* This set the CLIPS environment.
60
* It is guaranteed that this is called for a CLIPS Thread before start
61
* is called (when running regularly inside Fawkes).
62
* @param clips CLIPS environment
63
*/
64
void
65
CLIPSAspect::init_CLIPSAspect(
LockPtr<CLIPS::Environment>
clips)
66
{
67
this->clips = clips;
68
}
69
70
/** Finalize CLIPS aspect.
71
* This clears the CLIPS environment.
72
*/
73
void
74
CLIPSAspect::finalize_CLIPSAspect()
75
{
76
clips.
clear
();
77
}
78
79
}
// end namespace fawkes
src
plugins
clips
aspect
clips.cpp
Generated by
1.8.1.1