yat  0.12.3pre
OptionOutFile.h
1 #ifndef _theplu_yat_utility_option_ofile_
2 #define _theplu_yat_utility_option_ofile_
3 
4 // $Id: OptionOutFile.h 2119 2009-12-12 23:11:43Z peter $
5 
6 /*
7  Copyright (C) 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 "deprecate.h"
27 #include "OptionFile.h"
28 
29 #include <iosfwd>
30 #include <string>
31 
32 namespace theplu {
33 namespace yat {
34 namespace utility {
35 
36  class CommandLine;
44  class OptionOutFile : public OptionFile
45  {
46  public:
57  OptionOutFile(CommandLine& cmd, std::string name, std::string desc,
59 
63  virtual ~OptionOutFile(void);
64 
69  std::ostream& ostream(void);
70 
71  private:
72  std::ofstream* os_;
73 
74  };
75 
76 }}} // of namespace utility, yat, and theplu
77 
78 #endif
Class for file related options.
Definition: OptionOutFile.h:44
bool required(void) const
Definition: OptionArg.h:100
#define YAT_DEPRECATE_GCC_PRE4_3
with GCC 4.3 and newer (or other compilers) define it as empty
Definition: deprecate.h:53
virtual ~OptionOutFile(void)
Destructor.
Class for parsing the command line.
Definition: CommandLine.h:98
OptionOutFile(CommandLine &cmd, std::string name, std::string desc, bool required=false) YAT_DEPRECATE_GCC_PRE4_3
Constructor.
Class for file related options.
Definition: OptionFile.h:50
const CommandLine & cmd(void) const
std::ostream & ostream(void)
stream ss to underlying file. If no file was given during parsing, reference to std::cout is returned...

Generated on Mon Jun 1 2015 12:29:52 for yat by  doxygen 1.8.5