]>
cygwin.com Git - cygwin-apps/setup.git/blob - libgetopt++/include/getopt++/OptionSet.h
b0c218ccbb1818b6445979bc2fb468e248cf4fa7
2 * Copyright (c) 2002 Robert Collins.
3 * Copyright (c) 2003 Robert Collins.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * A copy of the GNU General Public License can be found at
13 * Written by Robert Collins <robertc@hotmail.com>
22 #include "getopt++/Option.h"
24 typedef const std::string (*StrLookup
)(unsigned int);
31 virtual void Register (Option
*);
32 virtual bool Process (int argc
, char **argv
, Option
*nonOptionHandler
);
33 virtual bool Process (std::vector
<std::string
> const &parms
, Option
*nonOptionHandler
);
34 virtual bool process (Option
*nonOptionHandler
);
35 virtual void ParameterUsage (std::ostream
&, StrLookup strLookup
);
36 virtual std::vector
<Option
*> const &optionsInSet() const;
37 virtual std::vector
<std::string
> const &nonOptions() const;
38 virtual std::vector
<std::string
> const &remainingArgv() const;
40 OptionSet (OptionSet
const &);
41 OptionSet
&operator= (OptionSet
const &);
42 // force initialisation of variables
46 bool isOption(std::string::size_type
) const;
47 void doOption(std::string
&option
, std::string::size_type
const &pos
);
48 bool doNoArgumentOption(std::string
&option
, std::string::size_type
const &pos
);
49 void findOption(std::string
&option
, std::string::size_type
const &pos
,
50 Option
*&theOption
, int & prefixIndex
) const;
51 std::vector
<Option
*> options
;
52 std::vector
<std::string
> argv
;
53 std::vector
<std::string
> nonoptions
;
54 std::vector
<std::string
> remainingargv
;
55 Option
*nonOptionHandler
;
56 Option::Result lastResult
;
59 #endif // _OPTIONSET_H_
This page took 0.045627 seconds and 6 git commands to generate.