5 #ifndef _DDS_DDSHELPER_H_ 6 #define _DDS_DDSHELPER_H_ 12 #include <boost/property_tree/ini_parser.hpp> 13 #include <boost/property_tree/ptree.hpp> 19 if (
nullptr == _host ||
nullptr == _port)
20 throw std::invalid_argument(
"findCommanderServer: Arguments must not be null");
24 LOG(
info) <<
"Reading server info from: " << sSrvCfg;
26 throw std::runtime_error(
"Can't find server info file.");
28 boost::property_tree::ptree pt;
29 boost::property_tree::ini_parser::read_ini(sSrvCfg, pt);
30 *_host = pt.get<std::string>(_name +
".host");
31 *_port = pt.get<std::string>(_name +
".port");
void findCommanderServerImpl(std::string *_host, std::string *_port, const std::string &_name)
Definition: DDSHelper.h:17
void findCommanderServer(std::string *_host, std::string *_port)
Definition: DDSHelper.h:34
void findCommanderUI(std::string *_host, std::string *_port)
Definition: DDSHelper.h:39
#define LOG(severity)
Definition: Logger.h:34
static CUserDefaults & instance(const boost::uuids::uuid &_sid=CUserDefaults::getInitialSID())
Return singleton instance.
Definition: UserDefaults.cpp:37
Definition: BoostHelper.h:14