Mercurial > hg > nsaunier > traffic-intelligence
comparison c/Parameters.cpp @ 164:76610dcf3b8d
added test code to read trajectories
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 28 Sep 2011 13:27:20 -0400 |
| parents | 6f10a227486c |
| children | 0e60a306d324 |
comparison
equal
deleted
inserted
replaced
| 163:cde87a07eb58 | 164:76610dcf3b8d |
|---|---|
| 14 po::options_description cmdLineAndFile("Command line and configuration file"); | 14 po::options_description cmdLineAndFile("Command line and configuration file"); |
| 15 | 15 |
| 16 // configuration filename | 16 // configuration filename |
| 17 onlyCmdLine.add_options() | 17 onlyCmdLine.add_options() |
| 18 ("help,h", "displays this help message") | 18 ("help,h", "displays this help message") |
| 19 ("tf", "tracks features") | |
| 20 ("gf", "groups features") | |
| 19 ("config-file", po::value<string>(&configurationFilename)->default_value("tracking.cfg"), "configuration file") | 21 ("config-file", po::value<string>(&configurationFilename)->default_value("tracking.cfg"), "configuration file") |
| 20 ; | 22 ; |
| 21 | 23 |
| 22 po::positional_options_description p; | 24 po::positional_options_description p; |
| 23 p.add("config-file", 1); | 25 p.add("config-file", 1); |
| 73 store(po::parse_config_file(configurationFile, cmdLineAndFile), vm); | 75 store(po::parse_config_file(configurationFile, cmdLineAndFile), vm); |
| 74 notify(vm); | 76 notify(vm); |
| 75 | 77 |
| 76 parameterDescription = getParameterDescription(cmdLineAndFile, vm); | 78 parameterDescription = getParameterDescription(cmdLineAndFile, vm); |
| 77 | 79 |
| 80 trackFeatures = vm.count("tf")>0; | |
| 81 groupFeatures = vm.count("gf")>0; | |
| 82 | |
| 78 if (vm.count("help")) { | 83 if (vm.count("help")) { |
| 79 cout << cmdLine << endl; | 84 cout << cmdLine << endl; |
| 80 // cout << "Positional options:"; | 85 // cout << "Positional options:"; |
| 81 // for (unsigned int i=0; i<p.max_total_count(); i++) | 86 // for (unsigned int i=0; i<p.max_total_count(); i++) |
| 82 // cout << " " << p.name_for_position(i); | 87 // cout << " " << p.name_for_position(i); |
