Ignore:
Timestamp:
05/13/11 15:48:57 (10 years ago)
Author:
tbretz
Message:
Use the functionality of boost program_options better; implemented po_bool() as a special po_switch() case; added some comments.
File:
1 edited

Legend:

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

    r10372 r10707  
    8080//        (",A",          po_float(),                    "include path")
    8181        ("radec",         po::value<vector<double>>(),                    "include path")
     82        ("switch",        po_switch(),                    "include path")
     83        ("bool",          var<bool>()->implicit_value(true),                    "include path")
    8284        ;
    8385
     
    167169
    168170    cout << "Program " << argv[0] << " started successfully." << endl;
     171
     172    cout << conf.Has("switch") << " " << conf.Get<bool>("switch") << endl;
     173    cout << conf.Has("bool") << " " << conf.Get<bool>("bool") << endl;
     174
    169175    return 0;
    170176/*
Note: See TracChangeset for help on using the changeset viewer.