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

Class Args

unittests/catch.hpp:5602–5620  ·  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

5600
5601 // Transport for raw args (copied from main args, or supplied via init list for testing)
5602 class Args {
5603 friend TokenStream;
5604 std::string m_exeName;
5605 std::vector<std::string> m_args;
5606
5607 public:
5608 Args( int argc, char const* const* argv )
5609 : m_exeName(argv[0]),
5610 m_args(argv + 1, argv + argc) {}
5611
5612 Args( std::initializer_list<std::string> args )
5613 : m_exeName( *args.begin() ),
5614 m_args( args.begin()+1, args.end() )
5615 {}
5616
5617 auto exeName() const -> std::string {
5618 return m_exeName;
5619 }
5620 };
5621
5622 // Wraps a token coming from a token stream. These may not directly correspond to strings as a single string
5623 // 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