Fawkes API  Fawkes Development Version
blackboard_computable.h
1 /***************************************************************************
2  * blackboard_computable.h - Computable providing blackboard access
3  *
4  *
5  * Created: 1:22:31 PM 2016
6  * Copyright 2016 Frederik Zwilling
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef FAWKES_SRC_PLUGINS_ROBOT_MEMORY_COMPUTABLES_BLACKBOARD_COMPUTABLE_H_
23 #define FAWKES_SRC_PLUGINS_ROBOT_MEMORY_COMPUTABLES_BLACKBOARD_COMPUTABLE_H_
24 
25 #include "../robot_memory.h"
26 
27 #include <aspect/logging.h>
28 #include <blackboard/blackboard.h>
29 #include <config/config.h>
30 
31 /** @class BlackboardComputable blackboard_computable.h
32  *
33  * @author Frederik Zwilling
34  */
36 {
37 public:
38  BlackboardComputable(RobotMemory * robot_memory,
39  fawkes::BlackBoard * blackboard,
40  fawkes::Logger * logger,
41  fawkes::Configuration *config);
42  virtual ~BlackboardComputable();
43 
44 private:
45  std::list<mongo::BSONObj> compute_interfaces(const mongo::BSONObj &query,
46  const std::string & collection);
47 
48  RobotMemory * robot_memory_;
49  fawkes::BlackBoard *blackboard_;
50  fawkes::Logger * logger_;
51  Computable * computable;
52  mongo::BSONArray get_interface_fields(fawkes::InterfaceFieldIterator it);
53 };
54 
55 #endif /* FAWKES_SRC_PLUGINS_ROBOT_MEMORY_COMPUTABLES_BLACKBOARD_COMPUTABLE_H_ */
Interface field iterator.
BlackboardComputable(RobotMemory *robot_memory, fawkes::BlackBoard *blackboard, fawkes::Logger *logger, fawkes::Configuration *config)
Constructor with references to objects of the plugin.
Class holding information for a single computable this class also enhances computed documents by addi...
Definition: computable.h:29
Computable providing access to blackboard interfaces.
Access to the robot memory based on mongodb.
Definition: robot_memory.h:48
The BlackBoard abstract class.
Definition: blackboard.h:45
Interface for configuration handling.
Definition: config.h:64
Interface for logging.
Definition: logger.h:41