]>
cygwin.com Git - cygwin-apps/setup.git/blob - libgetopt++/include/getopt++/BoolOption.h
2 * Copyright (c) 2002 Robert Collins.
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.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <robertc@hotmail.com>
16 #ifndef _BOOLOPTION_H_
17 #define _BOOLOPTION_H_
19 #include <getopt++/Option.h>
20 #include <getopt++/GetOption.h>
22 // Each registered option must implement this class.
23 class BoolOption
: public Option
26 enum class BoolOptionType
33 BoolOption(bool const defaultvalue
, char shortopt
, char const *longopt
= 0,
34 std::string
const &shorthelp
= std::string(),
35 BoolOptionType type
= BoolOptionType::simple
,
36 OptionSet
&owner
=GetOption::GetInstance());
37 virtual ~ BoolOption ();
38 virtual std::string
const shortOption () const;
39 virtual std::string
const longOption () const;
40 virtual std::vector
<std::string
> const & longOptionPrefixes () const;
41 virtual std::string
const shortHelp () const;
42 virtual Result
Process (char const *, int);
43 virtual Argument
argument () const;
44 operator bool () const;
51 std::string _shorthelp
;
55 #endif // _BOOLOPTION_H_
This page took 0.041099 seconds and 6 git commands to generate.