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
#include <getopt++/BoolOption.h>
20
BoolOption::BoolOption(bool const defaultvalue, char shortopt,
21
char const *longopt, string const &shorthelp,
22
OptionSet &owner) : _value (defaultvalue) ,
23
_ovalue (defaultvalue), _shortopt(shortopt),
24
_longopt (longopt), _shorthelp (shorthelp)
26
owner.Register (this);
29
BoolOption::~ BoolOption () {};
32
BoolOption::shortOption () const
34
return string() + _shortopt;
38
BoolOption::longOption () const
44
BoolOption::shortHelp () const
50
BoolOption::Process (char const *)
56
BoolOption::operator bool () const
62
BoolOption::argument () const