OpendTect-6_4  6.4
mmbatchjobdispatch.h
Go to the documentation of this file.
1 #ifndef mmbatchjobdispatch_h
2 #define mmbatchjobdispatch_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert
8  Date: Dec 2013
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "mmprocmod.h"
15 #include "batchjobdispatch.h"
16 
17 
18 namespace Batch
19 {
20 
22 { mODTextTranslationClass(MMProgDef);
23 public:
24 
25  MMProgDef( const char* mmpnm )
26  : mmprognm_(mmpnm) {}
27 
28  virtual bool isSuitedFor(const char* prognm) const = 0;
29  virtual bool canHandle( const JobSpec& js ) const
30  { return isSuitedFor( js.prognm_ ); }
31  virtual bool canResume( const JobSpec& js ) const
32  { return false; }
33 
35 
36 };
37 
38 
43 public:
44 
46  virtual ~MMJobDispatcher() {}
47 
48  virtual uiString description() const;
49  virtual bool isSuitedFor(const char*) const;
50  virtual bool canHandle(const JobSpec&) const;
51  virtual bool canResume(const JobSpec&) const;
52 
54  "Multi-Machine",tr("Multi-Machine"));
55 
56  static void addDef(MMProgDef*);
57 
58 protected:
59 
60  virtual bool init();
61  virtual bool launch();
62 
63  int defIdx(const char* pnm=0) const;
64 
65 };
66 
67 
68 } // namespace Batch
69 
70 
71 #endif
#define mExpClass(module)
Definition: commondefs.h:160
virtual bool canHandle(const JobSpec &js) const
Definition: mmbatchjobdispatch.h:29
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
virtual bool canResume(const JobSpec &js) const
Definition: mmbatchjobdispatch.h:31
bool init()
Base class (with factory) for methods to kick-off an OD batch job.
Definition: batchjobdispatch.h:70
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:289
Definition: uistring.h:89
the data we need to specify an OD batch job.
Definition: batchjobdispatch.h:26
BufferString prognm_
Definition: batchjobdispatch.h:41
Multi Machine Processing.
Definition: mmassetmgr.h:23
Definition: batchjobdispatch.h:21
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Definition: mmbatchjobdispatch.h:21
virtual ~MMJobDispatcher()
Definition: mmbatchjobdispatch.h:46
kicks off MM batch job dispatcher.
Definition: mmbatchjobdispatch.h:41
MMProgDef(const char *mmpnm)
Definition: mmbatchjobdispatch.h:25
BufferString mmprognm_
Definition: mmbatchjobdispatch.h:34

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019