aboutsummaryrefslogtreecommitdiff
path: root/paludis/args/args_option.hh
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2011-05-02 21:55:05 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2011-05-02 21:55:05 +0100
commitd22eca8b4565f8180c28d3b37618f3ea3a0b7f6e (patch)
treedaa9e6320814e1346072dbcebf77448818332699 /paludis/args/args_option.hh
parente48586fdc72b4c95df114a9ba1ccecae4418ef7b (diff)
downloadpaludis-d22eca8b4565f8180c28d3b37618f3ea3a0b7f6e.tar.gz
paludis-d22eca8b4565f8180c28d3b37618f3ea3a0b7f6e.tar.xz
Allow StringArgs to support --no-
Diffstat (limited to 'paludis/args/args_option.hh')
-rw-r--r--paludis/args/args_option.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/paludis/args/args_option.hh b/paludis/args/args_option.hh
index 67db22fdc..1a35d6d06 100644
--- a/paludis/args/args_option.hh
+++ b/paludis/args/args_option.hh
@@ -219,6 +219,7 @@ namespace paludis
{
private:
std::string _argument;
+ bool _can_be_negated;
void (* _validator) (const std::string &);
public:
@@ -226,14 +227,16 @@ namespace paludis
* Constructor
*/
StringArg(ArgsGroup * const, const std::string & long_name,
- const char short_name, const std::string & description);
+ const char short_name, const std::string & description,
+ const bool can_be_negated = false);
/**
* Constructor with validator.
*/
StringArg(ArgsGroup * const, const std::string & long_name,
const char short_name, const std::string & description,
- void (* validator) (const std::string &));
+ void (* validator) (const std::string &),
+ const bool can_be_negated = false);
/**
* Fetch the argument that was given to this option.