PhoenixPresentation  2.0.0
Set of cmake function to automate presentation generation
main.cpp File Reference
#include "OptionParser.h"
+ Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

OptionParser createOptionParser ()
 Create the OptionParser of this program. More...
 
int main (int argc, char **argv)
 

Function Documentation

◆ createOptionParser()

OptionParser createOptionParser ( )

Create the OptionParser of this program.

Returns
OptionParser of this program

Definition at line 13 of file main.cpp.

13  {
14  OptionParser parser(true, "1.0.0");
15  parser.setExampleLongOption("dps --version");
16  parser.setExampleShortOption("dps -v");
17 
18  parser.addOption("plugin", "p", OptionType::FILENAME, true, PString("Required option"));
19  parser.addOption("otherplugin", "q", OptionType::FILENAME, true, false, "other Required option");
20 
21  PString defaultConfigHost("");
22  parser.addOption("config", "c", defaultConfigHost, "Optional value");
23 
24  parser.addOption("loadonly", "l", OptionType::NONE, false, "Optional Trigger option");
25  return parser;
26 }
Parse the options passed to a program.
Definition: OptionParser.h:15
Extends the std::string.
Definition: PString.h:16

References OptionParser::addOption(), OptionType::FILENAME, OptionType::NONE, OptionParser::setExampleLongOption(), and OptionParser::setExampleShortOption().

+ Here is the call graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 28 of file main.cpp.

28  {
30  parser.parseArgument(argc, argv);
31  return 0;
32 }
OptionParser createOptionParser()
Create the OptionParser of this program.
Definition: main.cpp:17
void parseArgument(int argc, char **argv)
Parse the arguments passed to the program.

References createOptionParser(), and OptionParser::parseArgument().

+ Here is the call graph for this function: