23 #ifndef MESSAGE_ALGORITHMS20091211H 24 #define MESSAGE_ALGORITHMS20091211H 32 #include <boost/algorithm/string.hpp> 33 #include <boost/function.hpp> 36 namespace transitional
44 typedef boost::function<void(DCCLMessageVal&)>
AlgFunction1;
48 typedef boost::function<void(DCCLMessageVal&, const std::vector<DCCLMessageVal>&)>
AlgFunction2;
54 static void deleteInstance();
56 void algorithm(
DCCLMessageVal& in,
unsigned array_index,
const std::string& algorithm,
57 const std::map<std::string, std::vector<DCCLMessageVal> >& vals);
59 void run_algorithm(
const std::string& algorithm,
DCCLMessageVal& in,
60 const std::vector<DCCLMessageVal>& ref);
62 void add_algorithm(
const std::string& name, AlgFunction1 func) { adv_map1_[name] = func; }
64 void add_adv_algorithm(
const std::string& name,
AlgFunction2 func) { adv_map2_[name] = func; }
66 void check_algorithm(
const std::string& alg,
const DCCLMessage& msg);
70 std::map<std::string, AlgFunction1> adv_map1_;
71 std::map<std::string, AlgFunction2> adv_map2_;
boost::function< void(DCCLMessageVal &, const std::vector< DCCLMessageVal > &)> AlgFunction2
boost::function for a function taking a dccl::MessageVal reference, and the MessageVal of a second pa...
The global namespace for the Goby project.
boost::function< void(DCCLMessageVal &)> AlgFunction1
boost::function for a function taking a single DCCLMessageVal reference. Used for algorithm callbacks...