22 #ifndef FAWKES_SRC_PLUGINS_ROBOT_MEMORY_COMPUTABLE_H_ 23 #define FAWKES_SRC_PLUGINS_ROBOT_MEMORY_COMPUTABLE_H_ 25 #include <mongo/client/dbclient.h> 27 #include <boost/function.hpp> 33 mongo::Query query_to_compute,
34 std::string collection,
35 const boost::function<std::list<mongo::BSONObj>(mongo::BSONObj, std::string)> &compute_function,
36 double caching_time = 0.0,
40 std::list<mongo::BSONObj>
compute(mongo::BSONObj query);
46 boost::function<std::list<mongo::BSONObj>(mongo::BSONObj, std::string)> compute_function;
47 mongo::Query query_to_compute;
48 std::string collection;
int get_priority()
Gets the priority of the computable.
Class holding information for a single computable this class also enhances computed documents by addi...
std::list< mongo::BSONObj > compute(mongo::BSONObj query)
Compute demanded information and insert it into the robot memory.
mongo::Query get_query()
Gets the query that defines what information is computed by the Computable.
Computable(mongo::Query query_to_compute, std::string collection, const boost::function< std::list< mongo::BSONObj >(mongo::BSONObj, std::string)> &compute_function, double caching_time=0.0, int priority=0)
Constructor for object holding information about a computable.
std::string get_collection()
Gets the collection the computable adds information to.