lemon/arg_parser.cc
changeset 325 0fbbb4bc42dd
parent 214 60eecd3fe37a
child 440 88ed40ad0d4f
equal deleted inserted replaced
6:0d5244449fb5 7:dfae08d83921
    24   {
    24   {
    25     (static_cast<ArgParser*>(p))->showHelp();
    25     (static_cast<ArgParser*>(p))->showHelp();
    26     exit(1);
    26     exit(1);
    27   }
    27   }
    28 
    28 
    29   ArgParser::ArgParser(int argc, const char **argv) :_argc(argc), _argv(argv),
    29   ArgParser::ArgParser(int argc, const char * const *argv)
    30                                                      _command_name(argv[0]) {
    30     :_argc(argc), _argv(argv), _command_name(argv[0]) {
    31     funcOption("-help","Print a short help message",_showHelp,this);
    31     funcOption("-help","Print a short help message",_showHelp,this);
    32     synonym("help","-help");
    32     synonym("help","-help");
    33     synonym("h","-help");
    33     synonym("h","-help");
    34 
       
    35   }
    34   }
    36 
    35 
    37   ArgParser::~ArgParser()
    36   ArgParser::~ArgParser()
    38   {
    37   {
    39     for(Opts::iterator i=_opts.begin();i!=_opts.end();++i)
    38     for(Opts::iterator i=_opts.begin();i!=_opts.end();++i)