PhoenixMock  1.8.7
Tools to split/merge/print mock used in Phoenix
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("plugin", "p", OptionType::FILENAME, true, "Required option");
18 
19  std::string defaultConfigHost("");
20  parser.addOption("config", "c", defaultConfigHost, "Optional value");
21 
22  parser.addOption("loadonly", "l", OptionType::NONE, false, "Optional Trigger option");
23  return parser;
24 }

References OptionType::FILENAME, OptionType::NONE, and createReleaseCurl::parser.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 26 of file main.cpp.

26  {
28  parser.parseArgument(argc, argv);
29 
30  const OptionMode & defaultMode = parser.getDefaultMode();
31  std::string pluginOption("");
32  defaultMode.getValue(pluginOption, "plugin");
33 // std::cout << "pluginOption = '" << pluginOption << "'" << std::endl;
34 
35  phoenix_assert(phoenix_check("Check ", pluginOption, "RequiredOptionValue"));
36  return 0;
37 }

References createOptionParser(), OptionMode::getValue(), createReleaseCurl::parser, phoenix_assert, and phoenix_check().

+ Here is the call graph for this function:
OptionMode::getValue
bool getValue(T &value, const std::string &optionName) const
Get the value of the option.
Definition: OptionMode_impl.h:18
phoenix_check
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.
Definition: phoenix_check.cpp:17
createReleaseCurl.parser
parser
Definition: createReleaseCurl.py:123
OptionParser
Parse the options passed to a program.
Definition: OptionParser.h:15
phoenix_assert
#define phoenix_assert(isOk)
Definition: phoenix_assert.h:19
OptionType::NONE
@ NONE
Definition: OptionType.h:24
createOptionParser
OptionParser createOptionParser()
Create the OptionParser of this program.
Definition: main.cpp:13
OptionMode
Describe a mode in the program arguments.
Definition: OptionMode.h:13
OptionType::FILENAME
@ FILENAME
Definition: OptionType.h:26