OpendTect-6_4  6.4
segyhdrcalc.h
Go to the documentation of this file.
1 #ifndef segyhdrcalc_h
2 #define segyhdrcalc_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Mar 2011
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "seismod.h"
16 #include "namedobj.h"
17 #include "segyhdrdef.h"
18 #include "typeset.h"
19 #include "od_iosfwd.h"
20 #include "uistring.h"
21 class Executor;
22 class BufferStringSet;
23 namespace Math { class Expression; }
24 
25 
26 namespace SEGY
27 {
28 class BinHeader;
29 class TxtHeader;
30 
32 { mODTextTranslationClass(HdrCalc);
33 public:
34 
35  HdrCalc( const HdrEntry& he, const char* def )
36  : he_(he), def_(def) {}
37 
38  const HdrEntry& he_;
40 
41  inline BufferString getDispStr() const
42  { return BufferString( he_.name(), " = ", def_ ); }
43 
44 };
45 
46 
48  , public NamedObject
50 public:
51  HdrCalcSet(const HdrDef&);
52  ~HdrCalcSet();
53  const HdrDef& hdrDef() { return hdef_; }
54  const HdrEntry& trcIdxEntry() { return trcidxhe_; }
55 
56  int indexOf(const char* entrynm) const;
57  int indexOf( const HdrCalc* he ) const
58  { return ObjectSet<HdrCalc>::indexOf(he); }
59  bool set(int,const char* def,uiString* emsg=0);
60  bool add(const HdrEntry&,const char* def,
61  uiString* emsg=0);
62  bool add(const char* dispstr);
63  void discard(int);
64  void setEmpty();
65 
66  void reSetSeqNr( int seqnr=1 ) { seqnr_ = seqnr; }
67  void apply(void*,bool needswap) const;
68  Executor* getApplier(od_istream&,od_ostream&,
69  int data_bytes_per_trace,
70  const BinHeader* bh=0,
71  const TxtHeader* th=0) const;
72 
73  bool storeInSettings() const;
74  void getFromSettings(const char*);
75 
76  static void getStoredNames(BufferStringSet&);
77  static const char* sKeySettsFile() { return "segyhdrcalc"; }
78 
79 protected:
80 
81  const HdrDef& hdef_;
85  mutable int seqnr_;
86 
87  Math::Expression* gtME(const char*,TypeSet<int>&,
88  uiString*) const;
89 
90 };
91 
92 } // namespace
93 
94 #endif
void reSetSeqNr(int seqnr=1)
Definition: segyhdrcalc.h:66
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
const HdrDef & hdef_
Definition: segyhdrcalc.h:81
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
400 byte SEG-Y binary header
Definition: segyhdr.h:80
ObjectSet< Math::Expression > exprs_
Definition: segyhdrcalc.h:83
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
const HdrEntry & he_
intended target
Definition: segyhdrcalc.h:38
Definition: segyhdrcalc.h:47
BufferString def_
user-defined math formula
Definition: segyhdrcalc.h:39
Definition: uistring.h:89
Set of BufferString objects.
Definition: bufstringset.h:28
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
OD class for stream read.
Definition: od_istream.h:24
HdrCalc(const HdrEntry &he, const char *def)
Definition: segyhdrcalc.h:35
ObjectSet< TypeSet< int > > heidxs_
Definition: segyhdrcalc.h:84
Set of pointers to objects.
Definition: commontypes.h:32
HdrEntry trcidxhe_
Definition: segyhdrcalc.h:82
int seqnr_
Definition: segyhdrcalc.h:85
Definition: segyhdrdef.h:85
int indexOf(const HdrCalc *he) const
Definition: segyhdrcalc.h:57
const HdrEntry & trcIdxEntry()
Definition: segyhdrcalc.h:54
Parsed Math expression.
Definition: mathexpression.h:32
const HdrDef & hdrDef()
Definition: segyhdrcalc.h:53
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
describes one tape or trace header field,
Definition: segyhdrdef.h:35
const char * name() const
static const char * sKeySettsFile()
Definition: segyhdrcalc.h:77
3200 byte SEG-Y text header.
Definition: segyhdr.h:40
Definition: math2.h:29
Keys that should be used with od_process_segyio.cc.
Definition: segybatchio.h:22
BufferString getDispStr() const
Definition: segyhdrcalc.h:41
virtual size_type indexOf(const T *) const
Definition: objectset.h:337
Definition: segyhdrcalc.h:31
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