#include <args_option.hh>
Public Member Functions | |
StringArg (ArgsGroup *const, const std::string &long_name, const char short_name, const std::string &description) | |
StringArg (ArgsGroup *const, const std::string &long_name, const char short_name, const std::string &description, void(*validator)(const std::string &)) | |
const std::string & | argument () const |
void | set_argument (const std::string &arg) |
virtual bool | can_be_negated () const |
virtual const std::string | forwardable_string () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
paludis::args::StringArg::StringArg | ( | ArgsGroup * | const, | |
const std::string & | long_name, | |||
const char | short_name, | |||
const std::string & | description | |||
) |
Constructor
paludis::args::StringArg::StringArg | ( | ArgsGroup * | const, | |
const std::string & | long_name, | |||
const char | short_name, | |||
const std::string & | description, | |||
void(*)(const std::string &) | validator | |||
) |
Constructor with validator.
const std::string& paludis::args::StringArg::argument | ( | ) | const [inline] |
Fetch the argument that was given to this option.
void paludis::args::StringArg::set_argument | ( | const std::string & | arg | ) |
Set the argument returned by argument().
virtual bool paludis::args::StringArg::can_be_negated | ( | ) | const [virtual] |
virtual const std::string paludis::args::StringArg::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.
Implements paludis::args::ArgsOption.