FACT++  1.0
void SetupConfiguration ( Configuration conf)
Examples:
chatserv.cc.

Definition at line 12 of file chatserv.cc.

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

Referenced by main().

13 {
14  const string n = conf.GetName()+".log";
15 
16  po::options_description config("Program options");
17  config.add_options()
18  ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
19  ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
20  ("log,l", var<string>(n), "Write log-file")
21  ;
22 
23  conf.AddEnv("dns", "DIM_DNS_NODE");
24  conf.AddEnv("host", "DIM_HOST_NODE");
25 
26  conf.AddOptions(config);
27 }
void AddEnv(const std::string &conf, const std::string &env)
void AddOptions(const po::options_description &opt, bool visible=true)
Definition: Configuration.h:92
const std::string & GetName() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function: