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.cc

    r979 r980  
    2525#include "FileUtil.h"
    2626
     27#include <stdexcept>
    2728#include <string>
    2829
     
    3233
    3334
    34   OptionFile::OptionFile(CommandLine& cmd, std::string flag,
    35                          std::string desc, bool exist, std::string bits)
    36     : OptionArg<std::string>(cmd, flag, desc), exist_(exist), bits_(bits)
    37   {
    38   }
     35  OptionFile::OptionFile(CommandLine& cmd, std::string flag, std::string desc,
     36                         bool required, bool exist, std::string bits)
     37    : OptionArg<std::string>(cmd, flag, desc, required), exist_(exist),
     38      bits_(bits) {}
    3939
    4040
    41   void OptionFile::do_validate() const
     41  void OptionFile::do_validate2() const
    4242  {   
    4343    if (!present())
Note: See TracChangeset for help on using the changeset viewer.