25 #include <boost/program_options.hpp>
26 #include <boost/thread.hpp>
33 namespace po = boost::program_options;
53 public:
bool ParseArgs(
int argc,
char **argv);
58 public:
bool LoadFile(
const std::string &_filename=
"worlds/empty.world",
59 const std::string &_physics=
"");
61 public:
bool LoadString(
const std::string &_sdfString);
75 const std::string &_physics=
"");
77 private:
static void SigInt(
int _v);
79 private:
void ProcessParams();
81 private:
void OnControl(ConstServerControlPtr &_msg);
83 private:
bool OpenWorld(
const std::string &_filename);
85 private:
void ProcessControlMsgs();
87 private:
static bool stop;
90 private: boost::thread *masterThread;
95 private: boost::mutex *receiveMutex;
96 private: std::list<msgs::ServerControl> controlMsgs;
99 private: po::variables_map vm;