Fawkes API Fawkes Development Version
feature_config.h
1
2/***************************************************************************
3 * feature_config.h - CLIPS config feature
4 *
5 * Created: Sun Oct 06 13:06:14 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.
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_FEATURE_CONFIG_H_
24#define _PLUGINS_CLIPS_FEATURE_CONFIG_H_
25
26#include <plugins/clips/aspect/clips_feature.h>
27
28#include <map>
29#include <string>
30
31namespace CLIPS {
32class Environment;
33}
34
35namespace fawkes {
36class Configuration;
37class Logger;
38} // namespace fawkes
39
41{
42public:
44 virtual ~ConfigCLIPSFeature();
45
46 // for CLIPSFeature
47 virtual void clips_context_init(const std::string & env_name,
49 virtual void clips_context_destroyed(const std::string &env_name);
50
51private: // members
52 fawkes::Logger * logger_;
53 fawkes::Configuration *config_;
54
55 std::map<std::string, fawkes::LockPtr<CLIPS::Environment>> envs_;
56
57private: // methods
58 void clips_config_load(std::string env_name, std::string cfg_prefix);
59 void clips_config_cleanup(std::string env_name);
60};
61
62#endif
CLIPS blackboard feature.
virtual void clips_context_destroyed(const std::string &env_name)
Notification that a CLIPS environment has been destroyed.
virtual void clips_context_init(const std::string &env_name, fawkes::LockPtr< CLIPS::Environment > &clips)
Initialize a CLIPS context to use the provided feature.
virtual ~ConfigCLIPSFeature()
Destructor.
ConfigCLIPSFeature(fawkes::Logger *logger, fawkes::Configuration *config)
Constructor.
Environment representation for JSON transfer.
Definition: Environment.h:28
CLIPS feature maintainer.
Definition: clips_feature.h:42
Interface for configuration handling.
Definition: config.h:68
Interface for logging.
Definition: logger.h:42
Fawkes library namespace.