demo/arg_parser_demo.cc
changeset 132 50ff949140fa
parent 88 18444049848b
child 137 483bc6ed7292
equal deleted inserted replaced
1:a6cd7c130edd 2:c4236678f952
    35   double d;
    35   double d;
    36   bool b,sil;
    36   bool b,sil;
    37   bool g1,g2,g3;
    37   bool g1,g2,g3;
    38   ap.refOption("n", "An integer input.", i, true)
    38   ap.refOption("n", "An integer input.", i, true)
    39     .refOption("val", "A double input.", d)
    39     .refOption("val", "A double input.", d)
       
    40     .doubleOption("val2", "A double input.", d)
    40     .synonym("vals","val")
    41     .synonym("vals","val")
    41     .refOption("name", "A string input.", s)
    42     .refOption("name", "A string input.", s)
    42     .refOption("f", "A switch.", b)
    43     .refOption("f", "A switch.", b)
    43     .refOption("nohelp", "", sil)
    44     .refOption("nohelp", "", sil)
    44     .refOption("gra","Choice A",g1)
    45     .refOption("gra","Choice A",g1)
    45     .refOption("grb","Choice B",g2)
    46     .refOption("grb","Choice B",g2)
    46     .refOption("grc","Choice C",g3)
    47     .refOption("grc","Choice C",g3)
    47     .optionGroup("gr","gra")
    48     .optionGroup("gr","gra")
    48     .optionGroup("gr","grb")
    49     .optionGroup("gr","grbkk")
    49     .optionGroup("gr","grc")
    50     .optionGroup("gr","grc")
    50     .mandatoryGroup("gr")
    51     .mandatoryGroup("gr")
    51     .onlyOneGroup("gr")
    52     .onlyOneGroup("gr")
    52     .other("infile","The input file.")
    53     .other("infile","The input file.")
    53     .other("...");
    54     .other("...");