PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
main.cpp File Reference
#include "phoenix_assert.h"
#include "phoenix_check.h"
#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 15 of file main.cpp.

15  {
16  OptionParser parser(true, "1.0.0");
17  parser.addOption("mode", "m", OptionType::NONE, true, "Required option");
18  return parser;
19 }
Parse the options passed to a program.
Definition: OptionParser.h:15

References OptionParser::addOption(), and OptionType::NONE.

+ Here is the call graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 21 of file main.cpp.

21  {
23  parser.parseArgument(argc, argv);
24 
25  const OptionMode & defaultMode = parser.getDefaultMode();
26  phoenix_assert(defaultMode.isOptionExist("mode"));
27  return 0;
28 }
Describe a mode in the program arguments.
Definition: OptionMode.h:13
bool isOptionExist(const PString &optionName) const
Say if the given option has been passed to the program.
Definition: OptionMode.cpp:210
void parseArgument(int argc, char **argv)
Parse the arguments passed to the program.
const OptionMode & getDefaultMode() const
Get default mode.
#define phoenix_assert(isOk)
OptionParser createOptionParser()
Create the OptionParser of this program.
Definition: main.cpp:17

References createOptionParser(), OptionParser::getDefaultMode(), OptionMode::isOptionExist(), OptionParser::parseArgument(), and phoenix_assert.

+ Here is the call graph for this function: