OpendTect-6_4
6.4
|
Launches machine commands. More...
Public Member Functions | |
CommandLauncher (const MachineCommand &) | |
CommandLauncher (const MachineCommand &, bool isolated) | |
~CommandLauncher () | |
void | set (const MachineCommand &) |
void | set (const MachineCommand &, bool isolated) |
bool | execute (BufferString &output_stdout, BufferString *output_stderr=0) |
run &, wait until finished, catch output More... | |
bool | execute (const CommandExecPars &pars=CommandExecPars()) |
int | processID () const |
const char * | monitorFileName () const |
uiString | errorMsg () const |
od_istream * | getStdOutput () |
od_istream * | getStdError () |
od_ostream * | getStdInput () |
Static Public Member Functions | |
static void | addShellIfNeeded (BufferString &cmd) |
static void | addQuotesIfNeeded (BufferString &cmd) |
static void | manageQProcess (QProcess *) |
Protected Member Functions | |
void | reset () |
bool | doExecute (const char *comm, bool wait4finish, bool inconsole=false, bool createstreams=false) |
int | catchError () |
bool | startDetached (const char *, bool inconsole=false) |
Protected Attributes | |
MachineCommand | machcmd_ |
BufferString | monitorfnm_ |
bool | redirectoutput_ |
BufferString | progvwrcmd_ |
uiString | errmsg_ |
const BufferString | odprogressviewer_ |
QProcess * | process_ |
int64_t | pid_ |
od_istream * | stdoutput_ |
od_istream * | stderror_ |
od_ostream * | stdinput_ |
qstreambuf * | stdoutputbuf_ |
qstreambuf * | stderrorbuf_ |
qstreambuf * | stdinputbuf_ |
Private Member Functions | |
void | setIsolated () |
Static Private Member Functions | |
static uiString | tr (const char *text, const char *disambiguation=0, int pluralnr=-1) |
static uiString | legacyTr (const char *text, const char *disambiguation=0, int pluralnr=-1) |
Launches machine commands.
OS::CommandLauncher::CommandLauncher | ( | const MachineCommand & | ) |
OS::CommandLauncher::CommandLauncher | ( | const MachineCommand & | , |
bool | isolated | ||
) |
OS::CommandLauncher::~CommandLauncher | ( | ) |
|
static |
Checks for spaces in command, and surrounds command with quotes them if not already done.
|
static |
Analyses the cmd and looks for pipes or redirects. If these are found, the cmd is converted to a shell command.
|
protected |
|
protected |
|
inline |
bool OS::CommandLauncher::execute | ( | BufferString & | output_stdout, |
BufferString * | output_stderr = 0 |
||
) |
run &, wait until finished, catch output
bool OS::CommandLauncher::execute | ( | const CommandExecPars & | pars = CommandExecPars() | ) |
|
inline |
|
inline |
|
inline |
|
inlinestaticprivate |
|
static |
Add a QProcess and it will be deleted one day.
|
inline |
int OS::CommandLauncher::processID | ( | ) | const |
|
protected |
void OS::CommandLauncher::set | ( | const MachineCommand & | ) |
void OS::CommandLauncher::set | ( | const MachineCommand & | , |
bool | isolated | ||
) |
|
private |
|
protected |
|
inlinestaticprivate |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019