]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - libgetopt++/include/getopt++/BoolOption.h
Implement paired boolean options
[cygwin-apps/setup.git] / libgetopt++ / include / getopt++ / BoolOption.h
index 9e6a38c9bc21412944964530c739e0ffe9b47eff..8b20e1cca2e6b0a8acb0900f86770d98abef32e9 100644 (file)
 class BoolOption : public Option
 {
 public:
+  enum class BoolOptionType
+    {
+     simple,
+     pairedAble,
+     pairedNo,
+    };
+
   BoolOption(bool const defaultvalue, char shortopt, char const *longopt = 0,
-            String const &shorthelp = String(), 
-            OptionSet &owner=GetOption::GetInstance());
+             std::string const &shorthelp = std::string(),
+             BoolOptionType type = BoolOptionType::simple,
+             OptionSet &owner=GetOption::GetInstance());
   virtual ~ BoolOption ();
-  virtual char const shortOption () const;
-  virtual struct option longOption () const;
-  virtual String const shortHelp () const;
-  virtual bool Process (char const *);
+  virtual std::string const shortOption () const;
+  virtual std::string const longOption () const;
+  virtual std::vector<std::string> const & longOptionPrefixes () const;
+  virtual std::string const shortHelp () const;
+  virtual Result Process (char const *, int);
+  virtual Argument argument () const;
   operator bool () const;
 
 private:
   bool _value;
   bool _ovalue;
   char _shortopt;
   char const *_longopt;
-  String _shorthelp;
+  std::string _shorthelp;
+  BoolOptionType _type;
 };
 
 #endif // _BOOLOPTION_H_
This page took 0.025482 seconds and 5 git commands to generate.