paludis Version 3.0.2
The one true package mangler
paludis::args::AliasArg Class Reference

#include <args_option.hh>

Inheritance diagram for paludis::args::AliasArg:

Public Member Functions

 AliasArg (ArgsOption *const other, const std::string &new_long_name, bool is_hidden=false)
bool specified () const override
bool explicitly_specified () const override
void set_specified (const ArgsOptionSpecifiedness value) override
virtual bool hidden () const
virtual void set_hidden (const bool value)
ArgsOption * other () const
bool can_be_negated () const override
const std::string forwardable_string () const override PALUDIS_ATTRIBUTE((warn_unused_result))
const std::shared_ptr< Sequence< std::string > > forwardable_args () const override 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
ArgsGroup * group ()
Public Member Functions inherited from paludis::DeclareAbstractAcceptMethods< ArgsOption, MakeTypeList< StringArg, AliasArg, SwitchArg, IntegerArg, EnumArg, StringSetArg, StringSequenceArg >::Type >
void accept (UnwrappedVisitor_ &v)
Result_ accept_returning (UnwrappedVisitor_ &v, const Result_ &r=Result_())
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)
Result_ accept_returning (UnwrappedVisitor_ &v, const Result_ &r=Result_())
auto make_accept_returning (const Case_ &firstcase, const Cases_ &... cases) const -> CallResultType< Case_ >
void make_accept (const Cases_ &... cases) 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 ()=default

Detailed Description

An AliasArg is an alias for another argument.

Constructor & Destructor Documentation

◆ AliasArg()

paludis::args::AliasArg::AliasArg ( ArgsOption *const other,
const std::string & new_long_name,
bool is_hidden = false )

Constructor.

References other().

Member Function Documentation

◆ can_be_negated()

bool paludis::args::AliasArg::can_be_negated ( ) const
overridevirtual

Can we be negated?

Needs to match up with ArgsVisitor logic.

Implements paludis::args::ArgsOption.

◆ explicitly_specified()

bool paludis::args::AliasArg::explicitly_specified ( ) const
inlineoverridevirtual

Fetch whether or not we were explicitly (not an env var) specified. Used to catch -x y -x z where -x takes a single value.

Reimplemented from paludis::args::ArgsOption.

◆ forwardable_args()

const std::shared_ptr< Sequence< std::string > > paludis::args::AliasArg::forwardable_args ( ) const
overridevirtual

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.

References forwardable_args(), and PALUDIS_ATTRIBUTE.

Referenced by forwardable_args().

◆ forwardable_string()

const std::string paludis::args::AliasArg::forwardable_string ( ) const
overridevirtual

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.

References PALUDIS_ATTRIBUTE.

◆ other()

ArgsOption * paludis::args::AliasArg::other ( ) const
inline

Fetch our associated option.

Referenced by AliasArg().

◆ set_specified()

void paludis::args::AliasArg::set_specified ( const ArgsOptionSpecifiedness value)
inlineoverridevirtual

Set the value returned by specified().

Reimplemented from paludis::args::ArgsOption.

◆ specified()

bool paludis::args::AliasArg::specified ( ) const
inlineoverridevirtual

Fetch whether or not we were specified on the command line (or as an env var).

Reimplemented from paludis::args::ArgsOption.


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