MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / Args

Class Args

extlibs/catch/include/catch/catch.hpp:8507–8525  ·  view source on GitHub ↗

Transport for raw args (copied from main args, or supplied via init list for testing)

Source from the content-addressed store, hash-verified

8505
8506 // Transport for raw args (copied from main args, or supplied via init list for testing)
8507 class Args {
8508 friend TokenStream;
8509 std::string m_exeName;
8510 std::vector<std::string> m_args;
8511
8512 public:
8513 Args( int argc, char const* const* argv )
8514 : m_exeName(argv[0]),
8515 m_args(argv + 1, argv + argc) {}
8516
8517 Args( std::initializer_list<std::string> args )
8518 : m_exeName( *args.begin() ),
8519 m_args( args.begin()+1, args.end() )
8520 {}
8521
8522 auto exeName() const -> std::string {
8523 return m_exeName;
8524 }
8525 };
8526
8527 // Wraps a token coming from a token stream. These may not directly correspond to strings as a single string
8528 // may encode an option + its argument if the : or = form is used

Callers 1

applyCommandLineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected