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);
62 public:
bool LoadFile(
const std::string &_filename=
"worlds/empty.world",
63 const std::string &_physics=
"");
65 public:
bool LoadString(
const std::string &_sdfString);
78 private:
bool LoadImpl(sdf::ElementPtr _elem,
79 const std::string &_physics=
"");
81 private:
static void SigInt(
int _v);
83 private:
void ProcessParams();
85 private:
void OnControl(ConstServerControlPtr &_msg);
87 private:
bool OpenWorld(
const std::string &_filename);
89 private:
void ProcessControlMsgs();
91 private:
static bool stop;
94 private: boost::thread *masterThread;
99 private: boost::mutex *receiveMutex;
100 private: std::list<msgs::ServerControl> controlMsgs;
103 private: po::variables_map vm;