]> cygwin.com Git - cygwin-apps/setup.git/blob - libgetopt++/include/getopt++/BoolOption.h
2002-04-20 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / libgetopt++ / include / getopt++ / BoolOption.h
1 /*
2 * Copyright (c) 2002 Robert Collins.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by Robert Collins <robertc@hotmail.com>
13 *
14 */
15
16 #ifndef _BOOLOPTION_H_
17 #define _BOOLOPTION_H_
18
19 #include <getopt++/Option.h>
20 #include <getopt++/GetOption.h>
21
22 // Each registered option must implement this class.
23 class BoolOption : public Option
24 {
25 public:
26 BoolOption(bool const defaultvalue, char shortopt, char const *longopt = 0,
27 String const &shorthelp = String(),
28 OptionSet &owner=GetOption::GetInstance());
29 virtual ~ BoolOption ();
30 virtual String const shortOption () const;
31 virtual struct option longOption () const;
32 virtual String const shortHelp () const;
33 virtual bool Process (char const *);
34 operator bool () const;
35
36
37 private:
38 bool _value;
39 bool _ovalue;
40 char _shortopt;
41 char const *_longopt;
42 String _shorthelp;
43 };
44
45 #endif // _BOOLOPTION_H_
This page took 0.041195 seconds and 6 git commands to generate.