65 bool msgiffail=true) const;
71 mExp(
Batch)
bool infoMsg( const
char* msg,
bool cc_stdout=false);
76 static const
char* sKeyMasterHost();
77 static const
char* sKeyMasterPort();
78 static const
char* sKeyBG();
79 static const
char* sKeyJobID();
80 static const
char* sKeyDataDir() {
return "datadir"; }
81 static const char*
sKeyFinishMsg() {
return "Finished batch processing."; }
123 #define mRetJobErr(s) \ 125 if ( comm_ ) comm_->setState( JobCommunic::JobError ); \ 130 #define mRetError(s) \ 131 { errorMsg(toUiString(s)); mDestroyWorkers; return false; } 133 #define mRetHostErr(s) \ 135 if ( comm_ ) comm_->setState( JobCommunic::HostError ); \ 139 #define mStrmWithProcID(s) \ 140 strm << "\n[" << process_id << "]: " << s << "." << od_newline 142 #define mMessage(s) \ 143 strm << s << '.' << od_newline 145 #define mSetCommState(State) \ 148 comm_->setState( JobCommunic::State ); \ 149 if ( !comm_->updateState() ) \ 150 mRetHostErr( comm_->errMsg() ) \ 157 int main(
int argc,
char** argv )
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
void SetProgramArgs(int argc, char **argv)
BufferString finishmsg_
Definition: batchprog.h:103
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
StreamData & sdout_
Definition: batchprog.h:98
int jobid_
Definition: batchprog.h:115
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
#define mGlobal(module)
Definition: commondefs.h:163
const CommandLineParser & clParser()
Definition: batchprog.h:58
bool inbg_
Definition: batchprog.h:97
Definition: uistring.h:89
IOPar * iopar_
Definition: batchprog.h:99
#define mExp(module)
Definition: commondefs.h:159
Set of BufferString objects.
Definition: bufstringset.h:28
static const char * sKeyFinishMsg()
Definition: batchprog.h:81
const IOPar & pars() const
Definition: batchprog.h:55
Definition: commandlineparser.h:51
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
static BatchProgram * inst_
Definition: batchprog.h:93
Holds data to use and close an iostream.
Definition: strmdata.h:28
Main object for 'standard' batch programs.
Definition: batchprog.h:49
JobCommunic * comm_
Definition: batchprog.h:114
Definition: batchjobdispatch.h:21
int Execute_batch(int *, char **)
Definition: _execbatch.h:99
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Object with a name.
Definition: namedobj.h:35
int main(int argc, char **argv)
BufferStringSet requests_
Definition: batchprog.h:102
IOPar & pars()
Definition: batchprog.h:56
bool stillok_
Definition: batchprog.h:96
#define mClass(module)
Definition: commondefs.h:164
CommandLineParser * clparser_
Definition: batchprog.h:100
Multi-machine socket communicator Handles the communication between a client and the master...
Definition: jobcommunic.h:51
int jobId()
Definition: batchprog.h:110
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62