paludis  Version 2.6.0
Classes | Public Member Functions | List of all members
paludis::args::StringSetArg Class Reference

#include <args_option.hh>

+ Inheritance diagram for paludis::args::StringSetArg:

Classes

class  StringSetArgOptions
 

Public Member Functions

void add_argument (const std::string &arg)
 
virtual bool can_be_negated () const
 
virtual const std::string forwardable_string () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual const std::shared_ptr< Sequence< std::string > > forwardable_args () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
- Public Member Functions inherited from paludis::args::ArgsOption
void remove ()
 
const std::string & long_name () const
 
char short_name () const
 
const std::string & description () const
 
virtual bool specified () const
 
virtual bool explicitly_specified () const
 
virtual void set_specified (const ArgsOptionSpecifiedness value)
 
ArgsGroupgroup ()
 
- Public Member Functions inherited from paludis::DeclareAbstractAcceptMethods< ArgsOption, MakeTypeList< StringArg, AliasArg, SwitchArg, IntegerArg, EnumArg, StringSetArg, StringSequenceArg >::Type >
void accept (UnwrappedVisitor_ &v)
 
void accept (UnwrappedVisitor_ &v) const
 
void accept (const UnwrappedVisitor_ &v)
 
void accept (const UnwrappedVisitor_ &v) const
 
Result_ accept_returning (UnwrappedVisitor_ &v, const Result_ &r=Result_())
 
Result_ accept_returning (const UnwrappedVisitor_ &v, const Result_ &r=Result_())
 
Result_ accept_returning (UnwrappedVisitor_ &v, const Result_ &r=Result_()) const
 
Result_ accept_returning (const UnwrappedVisitor_ &v, const Result_ &r=Result_()) const
 
auto make_accept_returning (const Case_ &firstcase, const Cases_ &...cases) const -> CallResultType< Case_ >
 
void make_accept (const Cases_ &...cases) const
 
- Public Member Functions inherited from paludis::DeclareAbstractAcceptMethods< ArgsOption, ArgsOption::VisitableTypeList >
void accept (UnwrappedVisitor_ &v)
 
void accept (UnwrappedVisitor_ &v) const
 
void accept (const UnwrappedVisitor_ &v)
 
void accept (const UnwrappedVisitor_ &v) const
 
Result_ accept_returning (UnwrappedVisitor_ &v, const Result_ &r=Result_())
 
Result_ accept_returning (const UnwrappedVisitor_ &v, const Result_ &r=Result_())
 
Result_ accept_returning (UnwrappedVisitor_ &v, const Result_ &r=Result_()) const
 
Result_ accept_returning (const UnwrappedVisitor_ &v, const Result_ &r=Result_()) const
 
auto make_accept_returning (const Case_ &firstcase, const Cases_ &...cases) const -> CallResultType< Case_ >
 
void make_accept (const Cases_ &...cases) const
 

Basic operations

 StringSetArg (ArgsGroup *const, const std::string &long_name, const char short_name, const std::string &description, const StringSetArgOptions &options=StringSetArgOptions())
 
 StringSetArg (ArgsGroup *const, const std::string &long_name, const char short_name, const std::string &description, const StringSetArgOptions &options, void(*validator)(const std::string &))
 
 ~StringSetArg ()
 

Iterate over our args.

typedef WrappedForwardIterator< ConstIteratorTag, const std::string > ConstIterator
 
ConstIterator begin_args () const
 
ConstIterator end_args () const
 

Iterate over our allowed arguments and associated descriptions

typedef WrappedForwardIterator< AllowedArgConstIteratorTag, const std::pair< std::string, std::string > > AllowedArgConstIterator
 
AllowedArgConstIterator begin_allowed_args () const
 
AllowedArgConstIterator end_allowed_args () const
 

Additional Inherited Members

- Public Types inherited from paludis::DeclareAbstractAcceptMethods< ArgsOption, MakeTypeList< StringArg, AliasArg, SwitchArg, IntegerArg, EnumArg, StringSetArg, StringSequenceArg >::Type >
typedef MakeTypeList< StringArg, AliasArg, SwitchArg, IntegerArg, EnumArg, StringSetArg, StringSequenceArg >::Type VisitableTypeList
 
typedef ArgsOption VisitableBaseClass
 
- Public Types inherited from paludis::DeclareAbstractAcceptMethods< ArgsOption, ArgsOption::VisitableTypeList >
typedef ArgsOption::VisitableTypeList VisitableTypeList
 
typedef ArgsOption VisitableBaseClass
 
- Protected Member Functions inherited from paludis::args::ArgsOption
 ArgsOption (ArgsGroup *const, const std::string &long_name, const char short_name, const std::string &description)
 
virtual ~ArgsOption ()
 

Detailed Description

An option that takes a set of strings.

Member Function Documentation

void paludis::args::StringSetArg::add_argument ( const std::string &  arg)

Add an argument to the set.

virtual bool paludis::args::StringSetArg::can_be_negated ( ) const
virtual

Can we be negated?

Needs to match up with ArgsVisitor logic.

Implements paludis::args::ArgsOption.

virtual const std::shared_ptr<Sequence<std::string> > paludis::args::StringSetArg::forwardable_args ( ) const
virtual

Ourself as a sequence of strings.

For example, { '–foo', 'bar' } or { '–foo', 'bar', '–foo', 'baz' } if not specified, an empty sequence.

Since
0.46

Implements paludis::args::ArgsOption.

virtual const std::string paludis::args::StringSetArg::forwardable_string ( ) const
virtual

Ourself as a forwardable string.

For example, '–foo bar' or '–foo bar –foo baz' or '–foo', or if not specified, the empty string.

Since
0.40

Implements paludis::args::ArgsOption.


The documentation for this class was generated from the following file: