19 std::string templateDef(
"");
20 parser.
addOption(
"template",
"t", templateDef,
"template definition of the class (ex: 'typename T' or 'typename T, typename U', etc");
39 int main(
int argc,
char** argv){
48 std::cout <<
"Class mode activated" << std::endl;
49 std::string className(
"");
50 classMode.
getValue(className,
"name");
51 std::cout <<
"name of the class to be generated : '" << className <<
"'" << std::endl;
57 std::cout <<
"Source mode activated" << std::endl;
58 std::string fileName(
"");
59 sourceMode.
getValue(fileName,
"name");
60 std::cout <<
"name of the header/source files to be generated : " << fileName <<
"'" << std::endl;
int main(int argc, char **argv)
OptionParser createOptionParser()
Create the OptionParser of this program.
void printConstParser(const OptionParser &parser)
Do the same thing but with a const parser.
Describe a mode in the program arguments.
void print() const
Print the option of the mode.
bool isParsed() const
Say if the OptionMode contains option which are parsed.
bool getValue(T &value, const PString &optionName) const
Get the value of the option.
Parse the options passed to a program.
void parseArgument(int argc, char **argv)
Parse the arguments passed to the program.
void addOption(const PString &longOption, const PString &shortOption, OptionType::OptionType optionType, bool isRequired, const PString &docString)
Add an option in the OptionParser.
const OptionMode & getMode(const PString &name) const
Get mode by name.
void closeMode()
Close the current mode and go back to be default one.
void addMode(const PString &modeName)
Add a mode in the option.
void print() const
Print all the options.
const OptionMode & getDefaultMode() const
Get default mode.
#define phoenix_assert(isOk)
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.