23 #ifndef DYNAMICMOOSVARSH 24 #define DYNAMICMOOSVARSH 26 #include "goby/moos/moos_header.h" 35 const CMOOSMsg& get_moos_var(
const std::string& s) {
return vars[s]; }
37 const CMOOSMsg& operator[](
const std::string& s) {
return vars[s]; }
40 void update_moos_vars(
const MOOSMSG_LIST& NewMail)
42 for (MOOSMSG_LIST::const_iterator p = NewMail.begin(), n = NewMail.end(); p != n; ++p)
43 vars[p->GetKey()] = *p;
47 void update_moos_vars(
const CMOOSMsg& msg) { vars[msg.GetKey()] = msg; }
49 std::map<std::string, CMOOSMsg>& all() {
return vars; }
52 std::map<std::string, CMOOSMsg> vars;
57 inline bool valid(
const CMOOSMsg& m) {
return m.GetTime() != -1; }
The global namespace for the Goby project.