- Examples:
- chatserv.cc.
Definition at line 12 of file chatserv.cc.
References Configuration::AddEnv(), Configuration::AddOptions(), and Configuration::GetName().
Referenced by main().
14 const string n = conf.
GetName()+
".log";
16 po::options_description config(
"Program 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")
23 conf.
AddEnv(
"dns",
"DIM_DNS_NODE");
24 conf.
AddEnv(
"host",
"DIM_HOST_NODE");
void AddEnv(const std::string &conf, const std::string &env)
void AddOptions(const po::options_description &opt, bool visible=true)
const std::string & GetName() const