  | 
  
    ewmscp
    ..
    
   | 
 
 
 
 
Go to the documentation of this file.
    6 int main(
int argc, 
const char *argv[]) {
 
   16     options::single<double> complexDescription(
'\0', 
"ComplexDescription", 
"Pass here the Bremsstrahl-Tagging-Hodoscope-Engineering-Assemply-Rate in Hz", 84.);
 
   17     options::single<double> moreComplexDescription(
'\0', 
"MoreComplexDescription", 
"very complicated example option with very long explanation to illustrate automatic wrapping in help output when the explanations become very long and would break readability otherwise.", 42.);
 
   18     options::single<double> evenMoreComplexDescription(
'\0', 
"EvenMoreComplexDescription", 
"very complicated example option with very long explanation containing averylongwordwhichisunbreakableandthustriggersforcefulwordwrappinginaninconvenientplacetokeepthingssomehowatleastabitreadable.", 21.);
 
   39     auto unusedOptions = parser.
fParse(argc, argv);
 
   41     TApplicationOptions.
fFinalize(unusedOptions.begin(), unusedOptions.end());
 
   43     for (
auto & unusedOption : unusedOptions) {
 
   44         std::cout << 
"unused option : '" << unusedOption << 
"'" << std::endl;
 
   46     for (
auto & num : numbers) {
 
   47         std::cout << 
" number '" << num.first << 
"' is '" << num.second << 
"'\n";
 
   49     for (
auto & str : strings) {
 
   50         std::cout << 
" string '" << str.first << 
"' is '" << str.second << 
"'\n";
 
   52     for (
double & dnum : dnums) {
 
   53         std::cout << 
" double number '" << dnum << 
"'\n";
 
   58     for (
auto & it : stringS) {
 
   59         std::cout << 
" list std::string '" << it << 
"'\n";
 
   62     std::cout << 
"and the time variable is:";
 
   64     auto timebuf = std::chrono::system_clock::to_time_t(date);
 
   65     std::cout << 
", that is " << std::ctime(&timebuf);
 
   67     std::cout << 
"the duration is: ";
 
   69     std::cout << 
" or " << std::chrono::duration_cast<std::chrono::hours>(dur).count()  << 
" hours \n";
 
  
class that contains the parser, i.e. does that option handling
 
class specialisation for options of type bool
 
const std::vector< std::string > & fParse(int argc, const char *argv[])
parse the options on the command line
 
specific class to give the options for a TApplication as ForeignApplicationOptions to the option pars...
 
void fFinalize()
build the internal argument vector for the call to the external parser
 
template for map-based options.
 
int main(int argc, const char *argv[])
 
template for container-based options.
 
void fWriteValue(std::ostream &aStream) const override
write textual representation of value to a std::ostream
 
void fWriteValue(std::ostream &aStream) const override
write textual representation of value to a std::ostream
 
virtual void fRequire(const base *aOtherOption)