paludis::args::EnumArg Class Reference

#include <args_option.hh>

Inheritance diagram for paludis::args::EnumArg:

paludis::args::ArgsOption paludis::PrivateImplementationPattern< C_ > paludis::args::DepsOptionArg paludis::args::LogLevelArg

List of all members.

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

Classes

class  EnumArgOptions

Public Member Functions

 EnumArg (ArgsGroup *const group, const std::string &long_name, const char short_name, const std::string &description, const EnumArgOptions &opts, const std::string &default_arg)
const std::string & argument () const
void set_argument (const std::string &arg)
void set_default_arg (const std::string &arg)
const std::string & default_arg () const
virtual bool can_be_negated () const


Detailed Description

An option that takes one of a predefined set of string arguments.

Constructor & Destructor Documentation

paludis::args::EnumArg::EnumArg ( ArgsGroup *const   group,
const std::string &  long_name,
const char  short_name,
const std::string &  description,
const EnumArgOptions opts,
const std::string &  default_arg 
)

Constructor.


Member Function Documentation

const std::string& paludis::args::EnumArg::argument (  )  const [inline]

Fetch the argument that was given to this option.

virtual bool paludis::args::EnumArg::can_be_negated (  )  const [virtual]

Can we be negated?

Needs to match up with ArgsVisitor logic.

Implements paludis::args::ArgsOption.

const std::string& paludis::args::EnumArg::default_arg (  )  const [inline]

Fetch the default option, as specified to the constructor or set_default_arg().

void paludis::args::EnumArg::set_argument ( const std::string &  arg  ) 

Set the argument returned by argument(), having verified that it is one of the arguments allowed for this option.

void paludis::args::EnumArg::set_default_arg ( const std::string &  arg  ) 

Change the default option (should be called before set_argument()).


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

Generated on Mon Dec 22 19:43:57 2008 for paludis by  doxygen 1.5.7.1