yat  0.14.5pre
OptionFile.h
1 #ifndef _theplu_yat_utility_option_file_
2 #define _theplu_yat_utility_option_file_
3 
4 // $Id: OptionFile.h 2119 2009-12-12 23:11:43Z peter $
5 
6 /*
7  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2009 Peter Johansson
9 
10  This file is part of the yat library, http://dev.thep.lu.se/yat
11 
12  The yat library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU General Public License as
14  published by the Free Software Foundation; either version 3 of the
15  License, or (at your option) any later version.
16 
17  The yat library is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with yat. If not, see <http://www.gnu.org/licenses/>.
24 */
25 
26 #include "OptionArg.h"
27 
28 #include <string>
29 
30 namespace theplu {
31 namespace yat {
32 namespace utility {
33 
34  class CommandLine;
50  class OptionFile : public OptionArg<std::string>
51  {
52  public:
66  OptionFile(CommandLine& cmd, std::string name, std::string desc,
67  bool required=false, bool exist=false, std::string bits="");
68 
72  virtual ~OptionFile(void);
73 
74  private:
75  void do_validate2() const;
76 
77  bool exist_;
78  std::string bits_;
79 
80  };
81 
82 }}} // of namespace utility, yat, and theplu
83 
84 #endif
OptionFile(CommandLine &cmd, std::string name, std::string desc, bool required=false, bool exist=false, std::string bits="")
Constructor.
bool required(void) const
Definition: OptionArg.h:100
virtual ~OptionFile(void)
Destructor.
Option with argument.
Definition: OptionArg.h:51
Class for parsing the command line.
Definition: CommandLine.h:98
Class for file related options.
Definition: OptionFile.h:50
const CommandLine & cmd(void) const

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5