COIN-OR::LEMON - Graph Library

Changeset 95:cc7e6b8b59bf in lemon


Ignore:
Timestamp:
03/18/08 16:45:21 (17 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Bug fix in arg_parser.h (fix ticket #31) and doc improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/arg_parser.h

    r90 r95  
    128128    ///\param name The name of the option. The leading '-' must be omitted.
    129129    ///\param help A help string.
    130     ///\param value A default value for the option
     130    ///\param value A default value for the option.
    131131    ///\param obl Indicate if the option is mandatory.
    132132    ArgParser &intOption(const std::string &name,
     
    138138    ///\param name The name of the option. The leading '-' must be omitted.
    139139    ///\param help A help string.
    140     ///\param value A default value for the option
     140    ///\param value A default value for the option.
    141141    ///\param obl Indicate if the option is mandatory.
    142142    ArgParser &doubleOption(const std::string &name,
     
    148148    ///\param name The name of the option. The leading '-' must be omitted.
    149149    ///\param help A help string.
    150     ///\param value A default value for the option
    151     ///\param obl Indicate if the option is mandatory.
    152     ////\note A mandatory bool obtion is of very little use.)
     150    ///\param value A default value for the option.
     151    ///\param obl Indicate if the option is mandatory.
     152    ///\note A mandatory bool obtion is of very little use.
    153153    ArgParser &boolOption(const std::string &name,
    154154                      const std::string &help,
     
    159159    ///\param name The name of the option. The leading '-' must be omitted.
    160160    ///\param help A help string.
    161     ///\param value A default value for the option
     161    ///\param value A default value for the option.
    162162    ///\param obl Indicate if the option is mandatory.
    163163    ArgParser &stringOption(const std::string &name,
     
    197197    ///\param obl Indicate if the option is mandatory.
    198198    ///\retval ref The value of the argument will be written to this variable.
    199     ////\note A mandatory bool obtion is of very little use.)
     199    ///\note A mandatory bool obtion is of very little use.
    200200    ArgParser &refOption(const std::string &name,
    201201                      const std::string &help,
     
    206206    ///\param name The name of the option. The leading '-' must be omitted.
    207207    ///\param help A help string.
     208    ///\param obl Indicate if the option is mandatory.
    208209    ///\retval ref The value of the argument will be written to this variable.
    209     ///\param obl Indicate if the option is mandatory.
    210210    ArgParser &refOption(const std::string &name,
    211211                      const std::string &help,
     
    312312      {
    313313        Opts::iterator i = _parser._opts.find(_name);
    314         LEMON_ASSERT(i==_parser._opts.end(),
     314        LEMON_ASSERT(i!=_parser._opts.end(),
    315315                     std::string()+"Unkown option: '"+_name+"'");
    316         LEMON_ASSERT(i->second.type!=ArgParser::BOOL,
     316        LEMON_ASSERT(i->second.type==ArgParser::BOOL,
    317317                     std::string()+"'"+_name+"' is a bool option");
    318318        return *(i->second.bool_p);
     
    322322      {
    323323        Opts::iterator i = _parser._opts.find(_name);
    324         LEMON_ASSERT(i==_parser._opts.end(),
     324        LEMON_ASSERT(i!=_parser._opts.end(),
    325325                     std::string()+"Unkown option: '"+_name+"'");
    326         LEMON_ASSERT(i->second.type!=ArgParser::STRING,
     326        LEMON_ASSERT(i->second.type==ArgParser::STRING,
    327327                     std::string()+"'"+_name+"' is a string option");
    328328        return *(i->second.string_p);
     
    332332      {
    333333        Opts::iterator i = _parser._opts.find(_name);
    334         LEMON_ASSERT(i==_parser._opts.end(),
     334        LEMON_ASSERT(i!=_parser._opts.end(),
    335335                     std::string()+"Unkown option: '"+_name+"'");
    336         LEMON_ASSERT(i->second.type!=ArgParser::DOUBLE &&
    337                      i->second.type!=ArgParser::INTEGER,
     336        LEMON_ASSERT(i->second.type==ArgParser::DOUBLE ||
     337                     i->second.type==ArgParser::INTEGER,
    338338                     std::string()+"'"+_name+"' is a floating point option");
    339339        return i->second.type==ArgParser::DOUBLE ?
     
    344344      {
    345345        Opts::iterator i = _parser._opts.find(_name);
    346         LEMON_ASSERT(i==_parser._opts.end(),
     346        LEMON_ASSERT(i!=_parser._opts.end(),
    347347                     std::string()+"Unkown option: '"+_name+"'");
    348         LEMON_ASSERT(i->second.type!=ArgParser::INTEGER,
     348        LEMON_ASSERT(i->second.type==ArgParser::INTEGER,
    349349                     std::string()+"'"+_name+"' is an integer option");
    350350        return *(i->second.int_p);
Note: See TracChangeset for help on using the changeset viewer.