22 #ifndef FAWKES_SRC_PLUGINS_ROBOT_MEMORY_COMPUTABLE_H_
23 #define FAWKES_SRC_PLUGINS_ROBOT_MEMORY_COMPUTABLE_H_
25 #include <boost/function.hpp>
26 #include <bsoncxx/document/value.hpp>
27 #include <bsoncxx/document/view.hpp>
29 #include <mongocxx/client.hpp>
35 bsoncxx::document::value query_to_compute,
36 std::string collection,
37 const boost::function<std::list<bsoncxx::document::value>(bsoncxx::document::view, std::string)>
39 double caching_time = 0.0,
43 std::list<bsoncxx::document::value>
compute(bsoncxx::document::view query);
49 boost::function<std::list<bsoncxx::document::value>(bsoncxx::document::view, std::string)>
51 bsoncxx::document::value query_to_compute;
52 std::string collection;
Class holding information for a single computable this class also enhances computed documents by addi...
std::string get_collection()
Gets the collection the computable adds information to.
int get_priority()
Gets the priority of the computable.
bsoncxx::document::value get_query()
Gets the query that defines what information is computed by the Computable.
std::list< bsoncxx::document::value > compute(bsoncxx::document::view query)
Compute demanded information and insert it into the robot memory.
Computable(bsoncxx::document::value query_to_compute, std::string collection, const boost::function< std::list< bsoncxx::document::value >(bsoncxx::document::view, std::string)> &compute_function, double caching_time=0.0, int priority=0)
Constructor for object holding information about a computable.