MCPcopy Create free account
hub / github.com/cirquit/trdrop / applyCommandLine

Method applyCommandLine

ext/catch.hpp:6918–6938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6916 }
6917
6918 int applyCommandLine( int argc, char const* const* const argv, OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
6919 try {
6920 m_cli.setThrowOnUnrecognisedTokens( unusedOptionBehaviour == OnUnusedOptions::Fail );
6921 m_unusedTokens = m_cli.parseInto( Clara::argsToVector( argc, argv ), m_configData );
6922 if( m_configData.showHelp )
6923 showHelp( m_configData.processName );
6924 m_config.reset();
6925 }
6926 catch( std::exception& ex ) {
6927 {
6928 Colour colourGuard( Colour::Red );
6929 Catch::cerr()
6930 << "\nError(s) in input:\n"
6931 << Text( ex.what(), TextAttributes().setIndent(2) )
6932 << "\n\n";
6933 }
6934 m_cli.usage( Catch::cout(), m_configData.processName );
6935 return (std::numeric_limits<int>::max)();
6936 }
6937 return 0;
6938 }
6939
6940 void useConfigData( ConfigData const& _configData ) {
6941 m_configData = _configData;

Callers

nothing calls this directly

Calls 7

argsToVectorFunction · 0.85
TextClass · 0.85
TextAttributesClass · 0.85
parseIntoMethod · 0.80
whatMethod · 0.80
usageMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected