PhoenixMock  1.8.7
Tools to split/merge/print mock used in Phoenix
main_longString.cpp File Reference
#include "phoenix_assert.h"
#include "phoenix_check.h"
#include "OptionParser.h"
+ Include dependency graph for main_longString.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_longString.cpp.

15  {
16  OptionParser parser(true, "1.0.0");
17  parser.addOption("input", "i", OptionType::STRING, true, "Required option");
18  return parser;
19 }

References createReleaseCurl::parser, and OptionType::STRING.

Referenced by main().

+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 21 of file main_longString.cpp.

21  {
23  parser.parseArgument(argc, argv);
24 
25  const OptionMode & defaultMode = parser.getDefaultMode();
26  std::string inputFile("");
27  defaultMode.getValue(inputFile, "input");
28 // std::cout << "input = '" << inputFile << "'" << std::endl;
29 
30  phoenix_assert(inputFile == "one long string option");
31  return 0;
32 }

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

+ Here is the call graph for this function:
OptionType::STRING
@ STRING
Definition: OptionType.h:25
OptionMode::getValue
bool getValue(T &value, const std::string &optionName) const
Get the value of the option.
Definition: OptionMode_impl.h:18
createReleaseCurl.parser
parser
Definition: createReleaseCurl.py:123
OptionParser
Parse the options passed to a program.
Definition: OptionParser.h:15
createOptionParser
OptionParser createOptionParser()
Create the OptionParser of this program.
Definition: main_longString.cpp:15
phoenix_assert
#define phoenix_assert(isOk)
Definition: phoenix_assert.h:19
OptionMode
Describe a mode in the program arguments.
Definition: OptionMode.h:13