Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 26, 2006, 2:27:16 PM (19 years ago)
Author:
rennerc
Message:

implemented -h/—help argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/preferences/src/lib/parser/cmdline_parser/cmdline_parser.h

    r7243 r7250  
    2121  char        shortOption;
    2222  int         numArgs;
     23  std::string argNames;
     24  std::string help;
    2325};
    2426
     
    3537    virtual ~CmdLineParser();
    3638   
    37     bool add( int id, const std::string& longOption, char shortOption, int numArgs, bool back=false );
     39    bool add( int id, const std::string& longOption, char shortOption, int numArgs, const std::string & argNames, const std::string& help, bool back=false );
    3840
    3941    bool parse( ArgParserCallback cb, void* data, int argc, char** argv );
    4042   
     43    void showHelp();
     44   
    4145  private:
    4246    ArgTable argTable;
     47    std::string exeName;
    4348   
    4449    inline bool matches( ArgTableEntry entry, std::string arg, bool & finish );
Note: See TracChangeset for help on using the changeset viewer.