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

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