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