39 , createstreams_(false)
40 , prioritylevel_(isbatchprog ? -1.0f : 0.0f)
42 , isconsoleuiprog_(false) {}
60 void removeFromPar(
IOPar&)
const;
70 static int getMachinePriority(
float priolevel,
bool iswin);
84 MachineCommand(
const char* comm=0);
89 MachineCommand(
const char* comm,
const char* hnm);
91 inline const char*
command()
const {
return comm_; }
93 inline const char*
hostName()
const {
return hname_; }
95 inline const char*
remExec()
const {
return remexec_; }
96 inline void setRemExec(
const char* sh ) { remexec_ = sh; }
98 inline bool isBad()
const {
return comm_.isEmpty(); }
100 bool setFromSingleStringRep(
const char*,
101 bool ignorehostname=
false);
107 const char* getSingleStringRep()
const;
114 static const char* extractHostName(
const char*,
BufferString&);
126 static const char*
sKeyBG() {
return "bg"; }
127 static const char*
sKeyFG() {
return "fg"; }
158 int processID()
const;
169 bool doExecute(
const char* comm,
bool wait4finish,
170 bool inconsole =
false,
171 bool createstreams=
false );
173 bool startDetached(
const char*,
bool inconsole=
false);
205 static void manageQProcess(QProcess*);
int64_t pid_
Definition: oscommand.h:184
#define mExpClass(module)
Definition: commondefs.h:160
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
static const char * defaultRemExec()
Definition: oscommand.h:111
const char * remExec() const
Definition: oscommand.h:95
BufferString remexec_
Definition: oscommand.h:134
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Specifies how to execute a command.
Definition: oscommand.h:34
#define mGlobal(module)
Definition: commondefs.h:163
uiString errorMsg() const
Definition: oscommand.h:160
uiString errmsg_
Definition: oscommand.h:180
static const char * sKeyJobID()
Definition: oscommand.h:128
Definition: oscommand.h:24
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
#define mDefSetupClssMemb(clss, typ, memb)
Definition: commondefs.h:133
const char * command() const
Definition: oscommand.h:91
Encapsulates an actual command to execute + the machine to run it on.
Definition: oscommand.h:80
Launches machine commands.
Definition: oscommand.h:143
MachineCommand machcmd_
Definition: oscommand.h:175
od_istream * stderror_
Definition: oscommand.h:187
Definition: uistring.h:89
static const char * sKeyRemoteCmd()
Definition: oscommand.h:123
qstreambuf * stdinputbuf_
Definition: oscommand.h:192
static void setDefaultRemExec(const char *s)
Definition: oscommand.h:112
CommandExecPars(bool isbatchprog=false)
Definition: oscommand.h:37
Adapter to use a qprocess as a stream.
Definition: qstreambuf.h:37
OD class for stream read.
Definition: od_istream.h:24
static const char * sKeyMasterPort()
Definition: oscommand.h:125
void setRemExec(const char *sh)
Definition: oscommand.h:96
bool isBad() const
Definition: oscommand.h:98
QProcess * process_
Definition: oscommand.h:183
static BufferString defremexec_
Definition: oscommand.h:136
bool hasHostName() const
Definition: oscommand.h:109
od_ostream * stdinput_
Definition: oscommand.h:188
bool redirectoutput_
Definition: oscommand.h:177
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
BufferString hname_
Definition: oscommand.h:133
static const char * sKeyRemoteHost()
Definition: oscommand.h:122
Definition: oscommand.h:28
LaunchType
Definition: oscommand.h:28
void setHostName(const char *hnm)
Definition: oscommand.h:94
void setCommand(const char *cm)
Definition: oscommand.h:92
#define mFDQtclass(cls)
Definition: commondefs.h:228
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
const char * monitorFileName() const
Definition: oscommand.h:159
Definition: oscommand.h:28
const BufferString odprogressviewer_
Definition: oscommand.h:181
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString progvwrcmd_
Definition: oscommand.h:179
static const char * odRemExecCmd()
Definition: oscommand.h:121
BufferString errmsg_
Definition: horizontracker.h:119
static const char * sKeyPriority()
Definition: oscommand.h:62
static const char * sKeyMasterHost()
Definition: oscommand.h:124
const char * hostName() const
Definition: oscommand.h:93
qstreambuf * stderrorbuf_
Definition: oscommand.h:191
od_ostream * getStdInput()
Definition: oscommand.h:164
bool ExecCommand(const char *cmd, LaunchType lt=Wait4Finish, BufferString *stdoutput=0, BufferString *stderror=0)
od_istream * getStdOutput()
Definition: oscommand.h:162
static const char * sKeyBG()
Definition: oscommand.h:126
BufferString comm_
Definition: oscommand.h:132
od_istream * getStdError()
Definition: oscommand.h:163
BufferString monitorfnm_
Definition: oscommand.h:176
bool ExecODProgram(const char *prognm, const char *args=0, OS::LaunchType lt=OS::RunInBG)
od_istream * stdoutput_
Definition: oscommand.h:186
static const char * sKeyFG()
Definition: oscommand.h:127
qstreambuf * stdoutputbuf_
Definition: oscommand.h:190