#include "simple.pb.h" #include "goby/core.h" SimpleConfig my_cfg; // instantiate a C++ class version of the SimpleConfig protobuf message class Simple : public goby::core::Application { public: Simple() : goby::core::Application(&my_cfg) // Application reads the "simple.pb.cfg" and populates "my_cfg" if valid { assert(my_cfg.a_double() == 3.14159); assert(my_cfg.a_bool() == true); assert(my_cfg.a_string() == "hello"); std::cout << my_cfg.DebugString() << std::endl; quit(); } private: void loop() {} }; int main(int argc, char* argv[]) { return goby::run(argc, argv); }