34 m_exe = m_args.at(0U) ;
35 std::rotate( m_args.begin() , m_args.begin()+1U , m_args.end() ) ;
61 std::string(
"[") + m_exe.str() +
"]" :
62 std::string(
"[") + m_exe.str() +
"] [" +
Str::join(
"] [",m_args) +
"]" ;
67 m_args.push_back( arg ) ;
75 m_args.insert( m_args.begin() , m_exe.str() ) ;
76 m_args.insert( m_args.begin() , std::next(array.begin()) , array.end() ) ;
77 m_exe = m_args.at( 0U ) ;
A class which holds a represention of the argc/argv command line array, and supports simple command-l...
StringArray array(unsigned int shift=0U) const
Returns the arguments as a string array, with an optional shift.
ExecutableCommand(const std::string &command_line={})
Constructor taking a complete command-line.
void add(const std::string &arg)
Adds a command-line argument.
StringArray args() const
Returns the command-line arguments.
std::string displayString() const
Returns a printable representation for logging and diagnostics.
void insert(const G::StringArray &)
Inserts at the front of the command-line.
Path exe() const
Returns the executable.
A Path object represents a file system path.
static std::string join(std::string_view sep, const StringArray &strings)
Concatenates an array of strings with separators.
std::vector< std::string > StringArray
A std::vector of std::strings.