 |
PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
|
Go to the documentation of this file.
15 Option(
const std::string & longName =
"",
const std::string & shortName =
"",
const std::string & docString =
"");
16 Option(
const std::string & longName,
const std::string & shortName,
const OptionValue & value,
const std::string & docString =
"");
17 Option(
const std::string & longName,
const std::string & shortName,
const OptionValue & value,
bool isRequired,
const std::string & docString =
"");
18 Option(
const std::string & longName,
const std::string & shortName,
bool isRequired,
const std::string & docString =
"");
26 void print(
const std::string & indentation =
"")
const;
58 void getPossibleOption(std::string & possibleOption,
const std::string & cursorOption)
const;
59 void getPossibleValue(std::string & possibleValue,
const std::string & cursorOption)
const;
OptionValue p_value
Value of the Option.
bool isRequired() const
Get if the option is required.
void setIsParsed(bool isParsed)
Say if the Option has been parsed or not.
std::string p_shortName
Short name of the Option.
void setDocString(const std::string &docString)
Set the documentation string of the Option.
std::string p_longName
Long name of the Option.
bool isParsed() const
Say if the Option has been parsed or not.
bool p_isRequired
True if the option is required, false if it is optionnal.
void checkAlreadyParsed(const std::string &longOption)
Check if the Option has been already parsed.
bool checkArgument() const
Check the argument of the parser.
std::vector< Option > VecOption
Vector of option.
const OptionValue & getValue() const
Get the value of the Option.
bool p_isAllowEmpty
The option can be empty and can have a value.
bool isAllowEmpty() const
Get if the option value can be empty.
void print(const std::string &indentation="") const
Print an option.
void setLongName(const std::string &longName)
Set the long name of the option.
std::string p_firstPartParsedOption
First paet of parsed option (needed for bash completion)
Option & operator=(const Option &other)
Definition of equal operator of Option.
void setValue(const OptionValue &value)
Set the value of the option.
void copyOption(const Option &other)
Copy function of Option.
virtual ~Option()
Destructeur of Option.
const std::string & getShortName() const
Get the short name of the Option.
void getPossibleValue(std::string &possibleValue, const std::string &cursorOption) const
Complete the possible values of the Option.
bool parseOption(ArgParser &parser)
Parse the current option with the given parser.
bool p_isParsed
Say if the option has been parsed or not.
std::string p_docString
Documentation string of the current Option.
void setShortName(const std::string &shortName)
Set the short name of the option.
const std::string & getLongName() const
Get the long name of the Option.
Option(const std::string &longName="", const std::string &shortName="", const std::string &docString="")
Default constructor of Option.
bool parsePartOption(ArgParser &parser, const std::string &prefix, const std::string &optionName)
Parse the given option with the parser.
void setIsAllowEmpty(bool isAllowEmpty)
Say if the option can be empty or not.
Describe the value of an option passed to a program.
void initialisationOption()
Initialisation function of the class Option.
void setIsRequired(bool isRequired)
Set if the option is required.
void getPossibleOption(std::string &possibleOption, const std::string &cursorOption) const
Get the possible options for the bash completion.
const std::string & getDocString() const
Get the documentation string of the Option.
Parse the list of arguments passed to a program.