FACT++  1.0
void SetupConfiguration ( Configuration conf)

Definition at line 28 of file dimctrl.cc.

References Configuration::AddEnv(), Configuration::AddOptions(), Configuration::GetName(), po_bool(), and po_switch().

Referenced by main().

29 {
30 #if BOOST_VERSION < 104600
31  const string fname = fs::path(conf.GetName()).filename();
32 #else
33  const string fname = fs::path(conf.GetName()).filename().string();
34 #endif
35 
36  po::options_description control("Options ("+fname+")");
37  control.add_options()
38  ("force-console", po_switch(), "Forces console mode in server-mode.")
39  ("debug", po_bool(false), "Print the labels for debugging purpose")
40  ("user,u", var<string>(""), "A user name - just for logging purposes (default is ${USER})")
41  ("JavaScript.*", var<string>(), "Additional arguments which are provided to JavaScripts started in a dimctrl server via the START command")
42  ;
43 
44  if (fname!="dimserver")
45  {
46  control.add_options()
47  ("batch", var<string>(), "Start a batch script with the given name at the given label (script.dim[:N]) on the dimctrl-server")
48  ("start", var<string>(), "Start a java script with the given name on the dimctrl-server")
49  ("stop", po_switch(), "Stop a currently running script on the dimctrl-server")
50  ("interrupt", var<string>()->implicit_value(""), "Send an interrupt request (IRQ) to a running JavaScript.")
51  ("restart", var<string>(), "Send 'EXIT 126' to the given server")
52  ("msg", var<string>(), "Send a message to the chat server.")
53  ;
54  }
55 
56  conf.AddEnv("user", "USER");
57 
58  conf.AddOptions(control);
59 }
po::typed_value< bool > * po_switch()
void AddEnv(const std::string &conf, const std::string &env)
void AddOptions(const po::options_description &opt, bool visible=true)
Definition: Configuration.h:92
po::typed_value< bool > * po_bool(bool def=false)
const std::string & GetName() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function: