Ignore:
Timestamp:
Oct 22, 2007, 2:55:19 AM (14 years ago)
Author:
Peter
Message:

adding possibility to make option required

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/OptionFile.h

    r979 r980  
    4747       "f,file" for having both short and long option name
    4848       \param desc string used in help display
     49       \param required If true option must be found in commandline or
     50       exception is thrown in validation
    4951       \param exist if true File must exist
    5052       \param bits used to check permission on file, see
    5153       FileUtil
    5254    */
    53     OptionFile(CommandLine& cmd, std::string name,
    54                std::string desc, bool exist=false, std::string bits="");
     55    OptionFile(CommandLine& cmd, std::string name, std::string desc,
     56               bool required=false, bool exist=false, std::string bits="");
    5557
    5658
    5759  private:
    58     void do_validate() const;
     60    void do_validate2() const;
    5961
    6062    bool exist_;
Note: See TracChangeset for help on using the changeset viewer.