E-MailRelay

Public Member Functions | List of all members
G::ExecutableCommand Class Reference

A structure representing an external program, holding a path and a set of arguments. More...

`#include <gexecutablecommand.h>`

## Public Member Functions
| ExecutableCommand (const std::string &command_line=std::string())
| Constructor taking a complete command-line. More...
| ExecutableCommand (const G::Path &exe, const StringArray &args, bool os_add_wrapper=true)
| Constructor taking the executable and arguments explicitly. More...
Path | exe () const
| Returns the executable. More...
StringArray | args () const
| Returns the command-line arguments. More...
void | add (const std::string &arg)
| Adds a command-line argument. More...
std::string | displayString () const
| Returns a printable representation for logging and diagnostics. More...

## Detailed Description

A structure representing an external program, holding a path and a set of arguments.

The constructor takes a complete command-line and splits it up into the executable part and a list of command-line parameters. If the command-line starts with a script then the contructed command-line may be for the appropriate interpreter (depending on the o/s).

See also
  G::Path, G::Args

Definition at line 43 of file gexecutablecommand.h.

## Constructor & Destructor Documentation

## ◆ ExecutableCommand() [1/2]

G::ExecutableCommand::ExecutableCommand | ( | const std::string & | command_line = `std::string()` | ) |
| explicit

Constructor taking a complete command-line.

The command-line is split up on unescaped-and-unquoted space characters.

Definition at line 27 of file gexecutablecommand.cpp.

## ◆ ExecutableCommand() [2/2]

G::ExecutableCommand::ExecutableCommand | ( | const G::Path & | exe,
|  | const StringArray & | args,
|  | bool | os_add_wrapper = `true`
| ) |  |

Constructor taking the executable and arguments explicitly.

Definition at line 53 of file gexecutablecommand.cpp.

## Member Function Documentation

## ◆ add()

void G::ExecutableCommand::add | ( | const std::string & | arg | ) |

Adds a command-line argument.

Definition at line 81 of file gexecutablecommand.cpp.

## ◆ args()

G::StringArray G::ExecutableCommand::args | ( |  | ) | const

Returns the command-line arguments.

Definition at line 68 of file gexecutablecommand.cpp.

## ◆ displayString()

std::string G::ExecutableCommand::displayString | ( |  | ) | const

Returns a printable representation for logging and diagnostics.

Definition at line 73 of file gexecutablecommand.cpp.

## ◆ exe()

G::Path G::ExecutableCommand::exe | ( |  | ) | const

Returns the executable.

Definition at line 63 of file gexecutablecommand.cpp.

The documentation for this class was generated from the following files:

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gexecutablecommand.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gexecutablecommand.cpp
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gexecutablecommand_unix.cpp