OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "earthmodelmod.h"
16 #include "transl.h"
17 
18 class Executor;
19 class IOObj;
20 namespace EM { class Body; }
21 
22 typedef EM::Body EMBody;
23 
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 
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 
85 
86 
87 
odEMBodyTranslator::reader
Executor * reader(const IOObj &)
odEMBodyTranslator
OpendTect format EM::Body Translator.
Definition: embodytr.h:55
EMBody
EM::Body EMBody
Definition: embodytr.h:22
EMBodyTranslator
Base class for all EM::Body Translators.
Definition: embodytr.h:40
EMBodyTranslatorGroup::sKeyUserWord
static FixedString sKeyUserWord()
Definition: embodytr.h:33
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
isTranslator
#define isTranslator(spec, clss)
Definition: transl.h:244
EM
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: bulk2dhorizonscanner.h:26
EM::Body
A body that can deliver an implicit body.
Definition: embody.h:50
odEMBodyTranslator::getReadBody
EMBody * getReadBody()
Definition: embodytr.h:63
odEMBodyTranslator::errMsg
uiString errMsg() const
Definition: embodytr.h:64
odEMBodyTranslator::~odEMBodyTranslator
isTranslator(od, EMBody) public ~odEMBodyTranslator()
Executor
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
mDefEmptyTranslatorGroupConstructor
#define mDefEmptyTranslatorGroupConstructor(clss)
Definition: transl.h:269
EMBodyTranslatorGroup::isTranslatorGroup
isTranslatorGroup(EMBody) public
Definition: embodytr.h:27
mDefineIndividualBodyTranslator
#define mDefineIndividualBodyTranslator(spec)
Definition: embodytr.h:73
IOObj
Definition: ioobj.h:58
FixedString
OD::String that holds an existing text string.
Definition: fixedstring.h:29
TranslatorGroup
Group of Translators. Has a static factory.
Definition: transl.h:56
odEMBodyTranslator::errmsg_
uiString errmsg_
Definition: embodytr.h:69
mDefEmptyTranslatorBaseConstructor
#define mDefEmptyTranslatorBaseConstructor(clss)
Definition: transl.h:275
EMBodyTranslatorGroup
TranslatorGroup for EM::Body.
Definition: embodytr.h:27
EMBodyTranslator::errMsg
virtual uiString errMsg() const =0
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
odEMBodyTranslator::writer
Executor * writer(const EM::Body &, IOObj &)
MPE::errmsg_
BufferString errmsg_
Definition: horizontracker.h:118
EMBodyTranslator::getReadBody
virtual EMBody * getReadBody()=0
Translator
I/O Interpreter class for a certain object type.
Definition: transl.h:123
transl.h
od
od
Definition: strattransl.h:17
sKey::Body
FixedString Body()
Definition: keystrs.h:42
odEMBodyTranslator::readbody_
EMBody * readbody_
Definition: embodytr.h:64

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