OpendTect-6_4  6.4
embodytr.h
Go to the documentation of this file.
1 #ifndef embodytr_h
2 #define embodytr_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "transl.h"
18 
19 class Executor;
20 class IOObj;
21 namespace EM { class Body; }
22 
23 typedef EM::Body EMBody;
24 
29 public:
31 
32  const char* defExtension() const { return "body"; }
33  static FixedString sKeyExtension() { return "body"; }
34  static FixedString sKeyUserWord() { return "od"; }
35 };
36 
37 
41 {
42 public:
44 
45  virtual Executor* writer(const EM::Body&,IOObj&) = 0;
46  virtual Executor* reader(const IOObj&) = 0;
47  virtual EMBody* getReadBody() = 0;
48  virtual uiString errMsg() const = 0;
49 };
50 
51 
52 
57 public:
58  odEMBodyTranslator(const char* nm,const char* unm);
60 
61  Executor* writer(const EM::Body&,IOObj&);
62  Executor* reader(const IOObj&);
63 
64  EMBody* getReadBody() { return readbody_; }
65  uiString errMsg() const { return errmsg_; };
66 
67 protected:
68 
71 };
72 
73 
74 #define mDefineIndividualBodyTranslator(spec) \
75 mExpClass(EarthModel) spec##EMBodyTranslator : public odEMBodyTranslator \
76 { isTranslator(spec,EMBody) \
77 public: \
78  spec##EMBodyTranslator( const char* nm,const char* unm ) \
79  : odEMBodyTranslator(nm,unm) {} \
80  ~spec##EMBodyTranslator() {} \
81 };
82 
86 
87 
88 
89 #endif
#define mExpClass(module)
Definition: commondefs.h:160
#define mDefineIndividualBodyTranslator(spec)
Definition: embodytr.h:74
OpendTect format EM::Body Translator.
Definition: embodytr.h:55
Definition: ioobj.h:58
OD::String that holds an existing text string.
Definition: fixedstring.h:29
EMBody * getReadBody()
Definition: embodytr.h:64
od
Definition: strattransl.h:17
Definition: uistring.h:89
static FixedString sKeyUserWord()
Definition: embodytr.h:34
isTranslatorGroup(EMBody) public
Definition: embodytr.h:28
#define mDefEmptyTranslatorGroupConstructor(clss)
Definition: transl.h:255
Group of Translators. Has a static factory.
Definition: transl.h:56
uiString errmsg_
Definition: embodytr.h:70
TranslatorGroup for EM::Body.
Definition: embodytr.h:27
#define mDefEmptyTranslatorBaseConstructor(clss)
Definition: transl.h:261
EM::Body EMBody
Definition: embodytr.h:23
I/O Interpreter class for a certain object type.
Definition: transl.h:123
A body that can deliver an implicit body.
Definition: embody.h:50
FixedString Body()
Definition: keystrs.h:43
BufferString errmsg_
Definition: horizontracker.h:119
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
EMBody * readbody_
Definition: embodytr.h:65
const char * errMsg() const
Definition: horizontracker.h:61
Base class for all EM::Body Translators.
Definition: embodytr.h:40
#define isTranslator(spec, clss)
Definition: transl.h:230
Specification to enable chunkwise execution of a process.
Definition: executor.h:39

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