OpendTect  6.6
segyhdrcalc.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: Bert
8  Date: Mar 2011
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "seismod.h"
15 #include "namedobj.h"
16 #include "segyhdrdef.h"
17 #include "typeset.h"
18 #include "od_iosfwd.h"
19 #include "uistring.h"
20 class Executor;
21 class BufferStringSet;
22 namespace Math { class Expression; }
23 
24 
25 namespace SEGY
26 {
27 class BinHeader;
28 class TxtHeader;
29 
32 public:
33 
34  HdrCalc( const HdrEntry& he, const char* def )
35  : he_(he), def_(def) {}
36 
37  const HdrEntry& he_;
39 
40  inline BufferString getDispStr() const
41  { return BufferString( he_.name(), " = ", def_ ); }
42 
43 };
44 
45 
47  , public NamedObject
49 public:
50  HdrCalcSet(const HdrDef&);
52  const HdrDef& hdrDef() { return hdef_; }
53  const HdrEntry& trcIdxEntry() { return trcidxhe_; }
54 
55  int indexOf(const char* entrynm) const;
56  int indexOf( const HdrCalc* he ) const
57  { return ObjectSet<HdrCalc>::indexOf(he); }
58  bool set(int,const char* def,uiString* emsg=0);
59  bool add(const HdrEntry&,const char* def,
60  uiString* emsg=0);
61  bool add(const char* dispstr);
62  void discard(int);
63  void setEmpty();
64 
65  void reSetSeqNr( int seqnr=1 ) { seqnr_ = seqnr; }
66  void apply(void*,bool needswap) const;
68  int data_bytes_per_trace,
69  const BinHeader* bh=0,
70  const TxtHeader* th=0) const;
71 
72  bool storeInSettings() const;
73  void getFromSettings(const char*);
74 
76  static const char* sKeySettsFile() { return "segyhdrcalc"; }
77 
78 protected:
79 
80  const HdrDef& hdef_;
84  mutable int seqnr_;
85 
87  uiString*) const;
88 
89 };
90 
91 } // namespace
92 
SEGY::HdrDef
Definition: segyhdrdef.h:85
SEGY::HdrCalcSet::set
bool set(int, const char *def, uiString *emsg=0)
NamedObject
object with a name.
Definition: namedobj.h:42
segyhdrdef.h
SEGY::HdrCalcSet::heidxs_
ObjectSet< TypeSet< int > > heidxs_
Definition: segyhdrcalc.h:83
SEGY::HdrCalcSet::apply
void apply(void *, bool needswap) const
Math::Expression
Parsed Math expression.
Definition: mathexpression.h:32
SEGY::HdrCalcSet::getFromSettings
void getFromSettings(const char *)
SEGY::HdrCalcSet::seqnr_
int seqnr_
Definition: segyhdrcalc.h:84
uistring.h
SEGY::HdrCalcSet::hdrDef
const HdrDef & hdrDef()
Definition: segyhdrcalc.h:52
ObjectSet< HdrCalc >
SEGY::HdrCalcSet::reSetSeqNr
void reSetSeqNr(int seqnr=1)
Definition: segyhdrcalc.h:65
SEGY::HdrCalcSet::setEmpty
void setEmpty()
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
SEGY::HdrCalc::def_
BufferString def_
user-defined math formula
Definition: segyhdrcalc.h:38
Seis
Summary for a Seismic object.
Definition: segydirectdef.h:22
SEGY::HdrCalcSet
Definition: segyhdrcalc.h:48
SEGY::HdrCalcSet::hdef_
const HdrDef & hdef_
Definition: segyhdrcalc.h:80
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
od_istream
OD class for stream read common access to the std::cin.
Definition: od_istream.h:24
namedobj.h
SEGY::HdrCalcSet::add
bool add(const char *dispstr)
SEGY::HdrCalc::he_
const HdrEntry & he_
intended target
Definition: segyhdrcalc.h:37
SEGY::TxtHeader
3200 byte SEG-Y text header.
Definition: segyhdr.h:40
typeset.h
SEGY::HdrCalcSet::gtME
Math::Expression * gtME(const char *, TypeSet< int > &, uiString *) const
SEGY::HdrCalc::mODTextTranslationClass
mODTextTranslationClass(HdrCalc)
SEGY::HdrCalcSet::indexOf
int indexOf(const char *entrynm) const
SEGY::HdrEntry::name
const char * name() const
Executor
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
SEGY::HdrCalcSet::trcIdxEntry
const HdrEntry & trcIdxEntry()
Definition: segyhdrcalc.h:53
SEGY::HdrCalcSet::trcidxhe_
HdrEntry trcidxhe_
Definition: segyhdrcalc.h:81
SEGY::HdrCalcSet::mODTextTranslationClass
mODTextTranslationClass(HdrCalcSet)
SEGY::HdrCalcSet::~HdrCalcSet
~HdrCalcSet()
SEGY::HdrCalc::getDispStr
BufferString getDispStr() const
Definition: segyhdrcalc.h:40
SEGY::HdrCalcSet::storeInSettings
bool storeInSettings() const
SEGY::BinHeader
400 byte SEG-Y binary header
Definition: segyhdr.h:80
SEGY::HdrEntry
describes one tape or trace header field,
Definition: segyhdrdef.h:35
SEGY::HdrCalcSet::sKeySettsFile
static const char * sKeySettsFile()
Definition: segyhdrcalc.h:76
SEGY::HdrCalcSet::getStoredNames
static void getStoredNames(BufferStringSet &)
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
SEGY::HdrCalcSet::HdrCalcSet
HdrCalcSet(const HdrDef &)
ObjectSet::indexOf
virtual idx_type indexOf(const T *) const
Definition: objectset.h:420
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
SEGY::HdrCalcSet::exprs_
ObjectSet< Math::Expression > exprs_
Definition: segyhdrcalc.h:82
SEGY::HdrCalcSet::indexOf
int indexOf(const HdrCalc *he) const
Definition: segyhdrcalc.h:56
od_iosfwd.h
SEGY::HdrCalcSet::getApplier
Executor * getApplier(od_istream &, od_ostream &, int data_bytes_per_trace, const BinHeader *bh=0, const TxtHeader *th=0) const
SEGY
Keys that should be used with od_process_segyio.cc.
Definition: segybatchio.h:22
SEGY::HdrCalcSet::discard
void discard(int)
SEGY::HdrCalc::HdrCalc
HdrCalc(const HdrEntry &he, const char *def)
Definition: segyhdrcalc.h:34
SEGY::HdrCalc
Definition: segyhdrcalc.h:31
SEGY::HdrCalcSet::add
bool add(const HdrEntry &, const char *def, uiString *emsg=0)
od_ostream
OD class for stream write common access to the user log file, or std::cout in other than od_main.
Definition: od_ostream.h:26
Math
Definition: math2.h:29
TypeSet< int >

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