COIN-OR::LEMON - Graph Library

Changeset 2402:da8eb8f4ea41 in lemon-0.x for demo


Ignore:
Timestamp:
03/12/07 14:26:56 (14 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3233
Message:

An improved version of ArgParser?: You don't need to give an explicit storage
for each option.
TODO: Documentation must be updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/arg_parser_demo.cc

    r2391 r2402  
    2828  bool b,sil;
    2929  bool g1,g2,g3;
    30   ap.option("n", "an integer input", i, true)
    31     .option("val", "a double input", d)
     30  ap.refOption("n", "an integer input", i, true)
     31    .refOption("val", "a double input", d)
    3232    .synonym("vals","val")
    33     .option("name", "a string input", s)
    34     .option("f", "a switch", b)
    35     .option("nohelp", "", sil)
    36     .option("gra","Choise A",g1)
    37     .option("grb","Choise B",g2)
    38     .option("grc","Choise C",g3)
     33    .refOption("name", "a string input", s)
     34    .refOption("f", "a switch", b)
     35    .refOption("nohelp", "", sil)
     36    .refOption("gra","Choise A",g1)
     37    .refOption("grb","Choise B",g2)
     38    .refOption("grc","Choise C",g3)
    3939    .optionGroup("gr","gra")
    4040    .optionGroup("gr","grb")
Note: See TracChangeset for help on using the changeset viewer.