Fawkes API  Fawkes Development Version
clips_feature.h
1 
2 /***************************************************************************
3  * clips_feature.h - CLIPS feature aspect for Fawkes
4  *
5  * Created: Thu Jul 25 17:37:58 2013
6  * Copyright 2006-2013 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 #ifndef __PLUGINS_CLIPS_ASPECT_CLIPS_FEATURE_H_
25 #define __PLUGINS_CLIPS_ASPECT_CLIPS_FEATURE_H_
26 
27 #include <aspect/aspect.h>
28 #include <core/utils/lockptr.h>
29 
30 #include <string>
31 
32 namespace CLIPS {
33  class Environment;
34 }
35 
36 namespace fawkes {
37 #if 0 /* just to make Emacs auto-indent happy */
38 }
39 #endif
40 
41 class CLIPSFeature {
42  friend class CLIPSEnvManager;
43 
44  public:
45  CLIPSFeature(const char *feature_name);
46  virtual ~CLIPSFeature();
47 
48  virtual void clips_context_init(const std::string &env_name,
50  virtual void clips_context_destroyed(const std::string &env_name) = 0;
51 
52  protected:
53  const std::string clips_feature_name; ///< CLIPS feature name
54 
55 };
56 
57 class CLIPSFeatureAspect : public virtual Aspect
58 {
59  friend class CLIPSFeatureAspectIniFin;
60 
61  public:
63  CLIPSFeatureAspect(const std::list<CLIPSFeature *> features);
64  virtual ~CLIPSFeatureAspect();
65 
66  private:
67  std::list<CLIPSFeature *> clips_features_;
68 };
69 
70 } // end namespace fawkes
71 
72 #endif
Thread aspect to provide a feature to CLIPS environments.
Definition: clips_feature.h:57
Fawkes aspect base class.
Definition: aspect.h:34
Fawkes library namespace.
CLIPS feature maintainer.
Definition: clips_feature.h:41
CLIPSFeatureAspect initializer/finalizer.
Definition: clips.h:32
const std::string clips_feature_name
CLIPS feature name.
Definition: clips_feature.h:53
CLIPS environment manager.