Ignore:
Timestamp:
07/24/11 21:00:00 (13 years ago)
Author:
tbretz
Message:
Moved common option setup to Main.h; created Main namespace
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/drivectrl.cc

    r11574 r11575  
    938938void SetupConfiguration(Configuration &conf)
    939939{
    940     const string n = conf.GetName()+".log";
    941 
    942     po::options_description config("Program options");
    943     config.add_options()
    944         ("dns",       var<string>("localhost"),       "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
    945         ("host",      var<string>(""),                "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
    946         ("log,l",     var<string>(n), "Write log-file")
    947         ("no-dim,d",  po_switch(),    "Disable dim services")
    948         ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
    949         ("cmd",       vars<string>(), "Execute one or more commands at startup")
    950         ("exec,e",    vars<string>(), "Execute one or more scrips at startup")
    951         ("quit",      po_switch(),    "Quit after startup");
    952         ;
    953 
    954940    po::options_description control("FTM control options");
    955941    control.add_options()
     942        ("no-dim,d",  po_switch(),    "Disable dim services")
    956943        ("addr,a",  var<string>("localhost:7404"),  "Network address of FTM")
    957944        ("quiet,q", po_bool(),  "Disable printing contents of all received messages (except dynamic data) in clear text.")
    958945        ;
    959946
    960     conf.AddEnv("dns",  "DIM_DNS_NODE");
    961     conf.AddEnv("host", "DIM_HOST_NODE");
    962 
    963     conf.AddOptions(config);
    964947    conf.AddOptions(control);
    965948}
     
    1013996    Configuration conf(argv[0]);
    1014997    conf.SetPrintUsage(PrintUsage);
     998    Main::SetupConfiguration(conf);
    1015999    SetupConfiguration(conf);
    10161000
Note: See TracChangeset for help on using the changeset viewer.