4 #ifndef _DDS_MISCSETUP_H_ 5 #define _DDS_MISCSETUP_H_ 14 template <
class Options_t>
18 std::function<
bool(
int argc,
char* argv[], Options_t*)> _parseFunc)
23 dds::misc::Logger::instance().init();
26 std::vector<std::string> arguments(_argv + 1, _argv + _argc);
27 std::ostringstream ss;
28 std::copy(arguments.begin(), arguments.end(), std::ostream_iterator<std::string>(ss,
" "));
31 if (!_parseFunc(_argc, _argv, _options))
34 catch (std::exception& e)
48 dds::misc::Logger::instance().reinit();
50 catch (std::exception& e)
void reinit(const boost::uuids::uuid &_sid, const std::string &_cfgFileName, bool _get_default=false)
Definition: UserDefaults.cpp:48
#define LOG(severity)
Definition: Logger.h:34
void setupEnv()
Definition: Environment.h:59
int defaultExecReinit(const boost::uuids::uuid &_sid)
Definition: MiscSetup.h:42
static CUserDefaults & instance(const boost::uuids::uuid &_sid=CUserDefaults::getInitialSID())
Return singleton instance.
Definition: UserDefaults.cpp:37
int defaultExecSetup(int _argc, char *_argv[], Options_t *_options, std::function< bool(int argc, char *argv[], Options_t *)> _parseFunc)
Definition: MiscSetup.h:15
Definition: BoostHelper.h:14