MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / Parse

Method Parse

CppCoverage/OptionsParser.cpp:351–375  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

349
350 //-------------------------------------------------------------------------
351 boost::optional<Options>
352 OptionsParser::Parse(int argc,
353 const char** argv,
354 std::wostream* emptyOptionsExplanation) const
355 {
356 try
357 {
358 auto options = Parse(argc, argv);
359
360 if (!options && emptyOptionsExplanation)
361 *emptyOptionsExplanation << *programOptions_;
362
363 return options;
364 }
365 catch (const boost::program_options::unknown_option& unknownOption)
366 {
367 ShowExplanation(emptyOptionsExplanation, unknownOption.what());
368 }
369 catch (const Plugin::OptionsParserException& e)
370 {
371 ShowExplanation(emptyOptionsExplanation, e.what());
372 }
373
374 return boost::none;
375 }
376
377 //-------------------------------------------------------------------------
378 void OptionsParser::ShowExplanation(std::wostream* emptyOptionsExplanation,

Callers 2

ParseFunction · 0.45
RunMethod · 0.45

Calls 15

CheckArgumentsSizeFunction · 0.85
ParseConfigFileFunction · 0.85
GetPatternsFunction · 0.85
GetStartInfoFunction · 0.85
AddInputCoveragesFunction · 0.85
AddUnifiedDiffFunction · 0.85
AddExcludedLineRegexesFunction · 0.85
FillVariableMapMethod · 0.80
IsOptionSelectedMethod · 0.80
SetLogLevelMethod · 0.80

Tested by 1

ParseFunction · 0.36