OpendTect  6.6
welldata.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 Bril
8  Date: Aug 2003
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "wellmod.h"
15 
16 #include "callback.h"
17 #include "enums.h"
18 #include "multiid.h"
19 #include "namedobj.h"
20 #include "position.h"
21 #include "refcount.h"
22 #include "sets.h"
23 #include "uistring.h"
24 #include "welld2tmodel.h"
25 #include "wellman.h"
26 
27 
28 namespace Well
29 {
30 
31 class Track;
32 class Log;
33 class LogSet;
34 class Marker;
35 class MarkerSet;
36 class D2TModel;
37 class DisplayProperties;
38 
39 
46 public:
47 
48  Info( const char* nm )
49  : NamedCallBacker(nm)
50  , replvel(Well::getDefaultVelocity())
51  , groundelev(mUdf(float))
52  , welltype_(None)
53  {}
54 
55  enum WellType { None, Oil, Gas, OilGas, Dry, PluggedOil,
56  PluggedGas, PluggedOilGas, PermLoc, CancLoc,
57  InjectDispose };
59 
60  enum DepthType { MD, TVD, TVDSS, TWT };
62 
63  static const char* sKeyTVD() { return "True Vertical Depth [TVD]"; }
64  static const char* sKeyMD() { return "Measured Depth [MD]"; }
65 
66  void fillPar(IOPar&) const;
67  void usePar(const IOPar&);
68 
75 
77  float replvel;
78  float groundelev;
79 
80  static const char* sKeyDepthUnit();
81  static const char* sKeyUwid();
82  static const char* sKeyOper();
83  static const char* sKeyState();
84  static const char* sKeyCounty();
85  static const char* sKeyCoord();
86  static const char* sKeyKBElev();
87  static const char* sKeyTD();
88  static const char* sKeyTVDSS();
89  static const char* sKeyReplVel();
90  static const char* sKeyGroundElev();
91  static const char* sKeyWellType();
92  static int legacyLogWidthFactor();
93 
94 
95  static uiString sUwid();
96  static uiString sOper();
97  static uiString sState();
98  static uiString sCounty();
99  static uiString sCoord();
100  static uiString sKBElev();
101  static uiString sTD();
102  static uiString sTVDSS();
103  static uiString sReplVel();
105 };
106 
107 
122 {prepareForDelete(); delete this; } );
123 public:
124 
125  Data(const char* nm=0);
126 
127  const MultiID& multiID() const { return mid_; }
128  void setMultiID( const MultiID& mid ) const
129  { mid_ = mid; }
130 
131  virtual const OD::String& name() const { return info_.name(); }
132  virtual void setName(const char* nm) { info_.setName( nm ); }
133  const Info& info() const { return info_; }
134  Info& info() { return info_; }
135  const Track& track() const { return track_; }
136  Track& track() { return track_; }
137  const LogSet& logs() const { return logs_; }
138  LogSet& logs() { return logs_; }
139  const MarkerSet& markers() const { return markers_; }
140  MarkerSet& markers() { return markers_; }
141  const D2TModel* d2TModel() const { return d2tmodel_; }
142  D2TModel* d2TModel() { return d2tmodel_; }
143  const D2TModel* checkShotModel() const { return csmodel_; }
144  D2TModel* checkShotModel() { return csmodel_; }
148  { return for2d ? disp2d_ : disp3d_; }
149  const DisplayProperties& displayProperties( bool for2d=false ) const
150  { return for2d ? disp2d_ : disp3d_; }
151 
152  void setEmpty();
153 
155 
156  const Well::Log* getLog(const char* lognm) const;
157  Well::Log* getLogForEdit(const char* lognm);
159 
160  bool haveLogs() const;
161  bool haveMarkers() const;
162  bool haveD2TModel() const { return d2tmodel_; }
163  bool haveCheckShotModel() const { return csmodel_; }
165  void reloadLogNames() const;
167 
176 
177 protected:
178  void prepareForDelete() const;
179 
181  mutable MultiID mid_;
189 };
190 
191 } // namespace Well
192 
Well::getDefaultVelocity
float getDefaultVelocity()
Well::Data::name
virtual const OD::String & name() const
Definition: welldata.h:131
Well::Data::haveD2TModel
bool haveD2TModel() const
Definition: welldata.h:162
Well::Data::Data
Data(const char *nm=0)
Well::Data::multiID
const MultiID & multiID() const
Definition: welldata.h:127
Well::Info::sKeyDepthUnit
static const char * sKeyDepthUnit()
Well::Info::sTD
static uiString sTD()
Well::Data::setCheckShotModel
void setCheckShotModel(D2TModel *)
mine, too
Well::Data::disp2d_
DisplayProperties & disp2d_
Definition: welldata.h:187
Well::Data::mRefCountImplWithDestructor
mRefCountImplWithDestructor(Data, virtual ~Data(), {prepareForDelete();delete this;})
NamedCallBacker
CallBacker object with a name. Use if you want your object to be able to send and receive CallBack's,...
Definition: namedobj.h:72
Well::Info::sKeyTD
static const char * sKeyTD()
uistring.h
Well::Data
The holder of all data concerning a certain well.
Definition: welldata.h:121
Well::Data::markers_
MarkerSet & markers_
Definition: welldata.h:186
Well::Data::markerschanged
Notifier< Well::Data > markerschanged
Definition: welldata.h:170
Well::Data::displayProperties
const DisplayProperties & displayProperties(bool for2d=false) const
Definition: welldata.h:149
Well::Info::usePar
void usePar(const IOPar &)
Well::Data::d2tmodel_
D2TModel * d2tmodel_
Definition: welldata.h:184
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
Well::Data::markers
MarkerSet & markers()
Definition: welldata.h:140
Well::Data::loadState
Well::LoadReqs loadState() const
Well::Data::csmodel_
D2TModel * csmodel_
Definition: welldata.h:185
Well::Data::logs
const LogSet & logs() const
Definition: welldata.h:137
welld2tmodel.h
Well::Data::info
const Info & info() const
Definition: welldata.h:133
Well::Info::DepthType
DepthType
Definition: welldata.h:60
Well::Data::getLogForEdit
Well::Log * getLogForEdit(const char *lognm)
Well::Data::setName
virtual void setName(const char *nm)
Definition: welldata.h:132
Well::Data::track
Track & track()
Definition: welldata.h:136
Well::Data::prepareForDelete
void prepareForDelete() const
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Well::Info::county
BufferString county
Definition: welldata.h:72
namedobj.h
Well::Info::sOper
static uiString sOper()
Well::Data::csmdlchanged
Notifier< Well::Data > csmdlchanged
Definition: welldata.h:169
Well::Info::sKeyKBElev
static const char * sKeyKBElev()
Well::Data::levelToBeRemoved
void levelToBeRemoved(CallBacker *)
Well::Info::mODTextTranslationClass
mODTextTranslationClass(Well::Info) public
Definition: welldata.h:45
callback.h
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
sKey::TVDSS
FixedString TVDSS()
Definition: keystrs.h:171
Well::Info
Information about a certain well.
Definition: welldata.h:45
Repos::Data
@ Data
Definition: repos.h:24
Well::Info::uwid
BufferString uwid
Definition: welldata.h:69
Well::Data::reloadLogNames
void reloadLogNames() const
Well::Info::mDeclareEnumUtils
mDeclareEnumUtils(WellType)
Well::Data::setD2TModel
void setD2TModel(D2TModel *)
becomes mine
Well::Data::reloadLogNames
void reloadLogNames(CallBacker *)
Well::Data::disp3d_
DisplayProperties & disp3d_
Definition: welldata.h:188
Well::Info::sKeyWellType
static const char * sKeyWellType()
Well::Data::checkShotModel
const D2TModel * checkShotModel() const
Definition: welldata.h:143
Well::Info::legacyLogWidthFactor
static int legacyLogWidthFactor()
Well::Data::info
Info & info()
Definition: welldata.h:134
multiid.h
Well::Data::storedLogNames
const BufferStringSet & storedLogNames() const
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
Well::Info::sUwid
static uiString sUwid()
Well::Info::sKeyState
static const char * sKeyState()
Well::Data::track
const Track & track() const
Definition: welldata.h:135
Well::Track
Well track.
Definition: welltrack.h:29
Well
Definition: directionalsurvey.h:20
Well::Info::sKeyGroundElev
static const char * sKeyGroundElev()
Well::Info::sKeyCoord
static const char * sKeyCoord()
Well::Info::sKeyReplVel
static const char * sKeyReplVel()
Well::Data::haveMarkers
bool haveMarkers() const
Well::Info::surfacecoord
Coord surfacecoord
Definition: welldata.h:76
Well::Data::haveCheckShotModel
bool haveCheckShotModel() const
Definition: welldata.h:163
Well::Data::d2TModel
D2TModel * d2TModel()
Definition: welldata.h:142
Well::Info::sGroundElev
static uiString sGroundElev()
Well::Data::disp2dparschanged
Notifier< Well::Data > disp2dparschanged
Definition: welldata.h:173
Well::Info::replvel
float replvel
Definition: welldata.h:77
Well::MarkerSet
Set of Markers.
Definition: wellmarker.h:76
Well::Info::sCoord
static uiString sCoord()
Well::Info::welltype_
WellType welltype_
Definition: welldata.h:74
sKey::TWT
FixedString TWT()
Definition: keystrs.h:173
Notifier< Well::Data >
Well::Data::getLog
const Well::Log * getLog(const char *lognm) const
sKey::TVD
FixedString TVD(int n=1)
Definition: keystrs.h:170
Well::Data::setEmpty
void setEmpty()
removes everything
Well::Data::trackchanged
Notifier< Well::Data > trackchanged
Definition: welldata.h:171
File::Log
@ Log
Definition: file.h:122
Well::Data::haveLogs
bool haveLogs() const
Well::Info::sKeyTVDSS
static const char * sKeyTVDSS()
Well::Info::sKeyMD
static const char * sKeyMD()
Definition: welldata.h:64
position.h
Well::Data::reloaded
Notifier< Well::Data > reloaded
Definition: welldata.h:175
Well::Data::d2tchanged
Notifier< Well::Data > d2tchanged
Definition: welldata.h:168
Well::Data::mid_
MultiID mid_
Definition: welldata.h:181
MultiID
Compound key consisting of ints.
Definition: multiid.h:24
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Well::Log
Well log.
Definition: welllog.h:44
Network::None
@ None
Definition: networkcommon.h:33
sKey::MD
FixedString MD(int n=1)
Definition: keystrs.h:97
sKey::Marker
FixedString Marker()
Definition: keystrs.h:98
Well::DisplayProperties
Display properties of a well.
Definition: welldisp.h:39
Well::LogSet
Log set.
Definition: welllogset.h:32
Well::Data::logs_
LogSet & logs_
Definition: welldata.h:183
Well::Info::source_
BufferString source_
filename for OD storage
Definition: welldata.h:73
Well::Info::sKBElev
static uiString sKBElev()
Well::Data::setMultiID
void setMultiID(const MultiID &mid) const
Definition: welldata.h:128
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
Well::Info::sState
static uiString sState()
OD::String
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
Well::Info::fillPar
void fillPar(IOPar &) const
enums.h
Well::Info::groundelev
float groundelev
Definition: welldata.h:78
Well::LoadReqs
Definition: wellman.h:40
Well::Info::sCounty
static uiString sCounty()
Well::Info::sReplVel
static uiString sReplVel()
mUdf
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
refcount.h
Well::Data::info_
Info info_
Definition: welldata.h:180
Well::Data::markers
const MarkerSet & markers() const
Definition: welldata.h:139
wellman.h
Well::Info::sTVDSS
static uiString sTVDSS()
Well::Info::oper
BufferString oper
Definition: welldata.h:70
Well::Info::sKeyCounty
static const char * sKeyCounty()
Well::Info::state
BufferString state
Definition: welldata.h:71
Well::Data::checkShotModel
D2TModel * checkShotModel()
Definition: welldata.h:144
Well::Data::d2TModel
const D2TModel * d2TModel() const
Definition: welldata.h:141
Well::Info::PluggedOilGas
@ PluggedOilGas
Definition: welldata.h:56
Well::Info::sKeyUwid
static const char * sKeyUwid()
sets.h
Well::Data::track_
Track & track_
Definition: welldata.h:182
Well::Data::logschanged
CNotifier< Well::Data, int > logschanged
Definition: welldata.h:174
Well::D2TModel
Depth to time model.
Definition: welld2tmodel.h:34
CNotifier< Well::Data, int >
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
Well::Data::displayProperties
DisplayProperties & displayProperties(bool for2d=false)
Definition: welldata.h:147
Well::Info::WellType
WellType
Definition: welldata.h:55
Well::Data::disp3dparschanged
Notifier< Well::Data > disp3dparschanged
Definition: welldata.h:172
Well::Info::mDeclareEnumUtils
mDeclareEnumUtils(DepthType) static const char *sKeyTVD()
Definition: welldata.h:61
Well::Info::sKeyOper
static const char * sKeyOper()
Well::Data::logs
LogSet & logs()
Definition: welldata.h:138

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