23 bool expectedIsRequired,
bool expectedAllowEmpty,
const PString & expectedDocString)
43 bool expectedIsRequired,
bool expectedAllowEmpty,
const PString & expectedDocString)
55 Option opt(
"long",
"short",
false,
"some doc");
59 Option optReq(
"long",
"short",
true,
"some doc");
73 int main(
int argc,
char** argv){
int main(int argc, char **argv)
void printValueOfOpt(Option &opt, const PString &expectedLongOption, const PString &expectedShortOption, size_t expectedNbValue, bool expectedIsRequired, bool expectedAllowEmpty, const PString &expectedDocString)
Print value of Option.
void testOption()
Test the option type.
void printValueOfOptConst(const Option &opt, const PString &expectedLongOption, const PString &expectedShortOption, size_t expectedNbValue, bool expectedIsRequired, bool expectedAllowEmpty, const PString &expectedDocString)
Print value of Option.
Describe the value of an option passed to a program.
const PVecString & getValue() const
Get the vector of values.
Describes an option passed to a program.
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.
const PString & getLongName() const
Get the long name of the Option.
void setLongName(const PString &longName)
Set the long name of the option.
const OptionValue & getValue() const
Get the 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.
void setIsRequired(bool isRequired)
Set if the option is required.
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.
void setDocString(const PString &docString)
Set the documentation string of the Option.
bool isRequired() const
Get if the option is required.
#define phoenix_assert(isOk)
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.