COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/arg_parser.h

    r204 r108  
    119119  public:
    120120
    121     ///Constructor
     121    ///\e
    122122    ArgParser(int argc, const char **argv);
    123123
    124124    ~ArgParser();
    125125
    126     ///\name Options
    127     ///
    128 
    129     ///@{
    130 
    131126    ///Add a new integer type option
    132127
    133     ///Add a new integer type option.
    134128    ///\param name The name of the option. The leading '-' must be omitted.
    135129    ///\param help A help string.
     
    142136    ///Add a new floating point type option
    143137
    144     ///Add a new floating point type option.
    145138    ///\param name The name of the option. The leading '-' must be omitted.
    146139    ///\param help A help string.
     
    153146    ///Add a new bool type option
    154147
    155     ///Add a new bool type option.
    156148    ///\param name The name of the option. The leading '-' must be omitted.
    157149    ///\param help A help string.
     
    165157    ///Add a new string type option
    166158
    167     ///Add a new string type option.
    168159    ///\param name The name of the option. The leading '-' must be omitted.
    169160    ///\param help A help string.
     
    174165                      std::string value="", bool obl=false);
    175166
    176     ///Give help string for non-parsed arguments.
    177 
    178     ///With this function you can give help string for non-parsed arguments.
    179     ///The parameter \c name will be printed in the short usage line, while
    180     ///\c help gives a more detailed description.
    181     ArgParser &other(const std::string &name,
    182                      const std::string &help="");
    183    
    184     ///@}
    185 
    186     ///\name Options with External Storage
     167    ///\name Options with external storage
    187168    ///Using this functions, the value of the option will be directly written
    188169    ///into a variable once the option appears in the command line.
     
    192173    ///Add a new integer type option with a storage reference
    193174
    194     ///Add a new integer type option with a storage reference.
    195175    ///\param name The name of the option. The leading '-' must be omitted.
    196176    ///\param help A help string.
     
    203183    ///Add a new floating type option with a storage reference
    204184
    205     ///Add a new floating type option with a storage reference.
    206185    ///\param name The name of the option. The leading '-' must be omitted.
    207186    ///\param help A help string.
     
    214193    ///Add a new bool type option with a storage reference
    215194
    216     ///Add a new bool type option with a storage reference.
    217195    ///\param name The name of the option. The leading '-' must be omitted.
    218196    ///\param help A help string.
     
    226204    ///Add a new string type option with a storage reference
    227205
    228     ///Add a new string type option with a storage reference.
    229206    ///\param name The name of the option. The leading '-' must be omitted.
    230207    ///\param help A help string.
     
    242219    ///@{
    243220
    244     ///Bundle some options into a group
     221    ///Boundle some options into a group
    245222
    246223    /// You can group some option by calling this function repeatedly for each
     
    254231
    255232    ///If you call this function for a group, than at most one of them can be
    256     ///given at the same time.
     233    ///given at the same time
    257234    ArgParser &onlyOneGroup(const std::string &group);
    258235 
     
    271248   
    272249    ///@}
     250
     251    ///Give help string for non-parsed arguments.
     252
     253    ///With this function you can give help string for non-parsed arguments.
     254    ///The parameter \c name will be printed in the short usage line, while
     255    ///\c help gives a more detailed description.
     256    ArgParser &other(const std::string &name,
     257                     const std::string &help="");
     258   
     259    ///Give back the non-option type arguments.
     260
     261    ///Give back a reference to a vector consisting of the program arguments
     262    ///not starting with a '-' character.
     263    std::vector<std::string> &files() { return _file_args; }
     264
     265    ///Give back the command name (the 0th argument)
     266    const std::string &commandName() { return _command_name; }
    273267
    274268    void show(std::ostream &os,Opts::iterator i);
     
    293287    }
    294288   
    295     ///Give back the command name (the 0th argument)
    296     const std::string &commandName() { return _command_name; }
    297 
    298289    ///Check if an opion has been given to the command.
    299290    bool given(std::string op)
     
    370361      return RefType(*this, n);
    371362    }   
    372 
    373     ///Give back the non-option type arguments.
    374 
    375     ///Give back a reference to a vector consisting of the program arguments
    376     ///not starting with a '-' character.
    377     std::vector<std::string> &files() { return _file_args; }
    378363 
    379364  };
    380365}
    381366
    382 #endif // LEMON_ARG_PARSER
     367   
     368
     369#endif // LEMON_MAIN_PARAMS
Note: See TracChangeset for help on using the changeset viewer.