]> cygwin.com Git - cygwin-apps/setup.git/blame - libgetopt++/include/getopt++/BoolOption.h
2003-12-10 20:45:32 GMT Robert Collins <rbtcollins@hotmail.com> patch-17
[cygwin-apps/setup.git] / libgetopt++ / include / getopt++ / BoolOption.h
CommitLineData
8e3e242c
RC
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
7419f059
RC
19#include <getopt++/Option.h>
20#include <getopt++/GetOption.h>
8e3e242c
RC
21
22// Each registered option must implement this class.
23class BoolOption : public Option
24{
25public:
26 BoolOption(bool const defaultvalue, char shortopt, char const *longopt = 0,
e930272e 27 std::string const &shorthelp = std::string(),
7419f059 28 OptionSet &owner=GetOption::GetInstance());
8e3e242c 29 virtual ~ BoolOption ();
e930272e 30 virtual std::string const shortOption () const;
1d644c06 31 virtual std::string const longOption () const;
e930272e 32 virtual std::string const shortHelp () const;
1d644c06
RC
33 virtual Result Process (char const *);
34 virtual Argument argument () const;
8e3e242c
RC
35 operator bool () const;
36
37
38private:
39 bool _value;
40 bool _ovalue;
41 char _shortopt;
42 char const *_longopt;
e930272e 43 std::string _shorthelp;
8e3e242c
RC
44};
45
46#endif // _BOOLOPTION_H_
This page took 0.044842 seconds and 5 git commands to generate.