]>
cygwin.com Git - cygwin-apps/setup.git/blob - libgetopt++/src/BoolOption.cc
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>
18 BoolOption::BoolOption(bool const defaultvalue
, char shortopt
,
19 char const *longopt
, string
const &shorthelp
,
20 OptionSet
&owner
) : _value (defaultvalue
) ,
21 _ovalue (defaultvalue
), _shortopt(shortopt
),
22 _longopt (longopt
), _shorthelp (shorthelp
)
24 owner
.Register (this);
27 BoolOption::~ BoolOption () {};
30 BoolOption::shortOption () const
32 return string() + _shortopt
;
36 BoolOption::longOption () const
38 struct option foo
= {_longopt
, no_argument
, NULL
, _shortopt
};
43 BoolOption::shortHelp () const
49 BoolOption::Process (char const *)
54 BoolOption::operator bool () const
This page took 0.038373 seconds and 5 git commands to generate.