OpendTect-6_4  6.4
welllog.h
Go to the documentation of this file.
1 #ifndef welllog_h
2 #define welllog_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert Bril
9  Date: Aug 2003
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "wellmod.h"
17 #include "welldahobj.h"
18 #include "ranges.h"
19 #include "iopar.h"
20 #include "unitofmeasure.h"
21 #include "propertyref.h"
22 
23 namespace Well
24 {
25 
45 {
46 public:
47 
48  Log( const char* nm=0 )
49  : DahObj(nm)
50  , range_(mUdf(float),-mUdf(float))
51  , iscode_(false) {}
52  Log( const Log& t )
53  : DahObj("") { *this = t; }
54  Log& operator =(const Log&);
55 
56  float value( int idx ) const { return vals_[idx]; }
57  void setValue(int idx,float val);
58 
59  float getValue(float,bool noudfs=false) const;
60  void addValue(float dh,float val);
62  void updateAfterValueChanges();
64  void ensureAscZ();
65  // Do this after adding values when Z may be reversed
66  bool insertAtDah(float dh,float val);
67  void removeTopBottomUdfs();
68 
69  Interval<float>& valueRange() { return range_; }
70  const Interval<float>& valueRange() const { return range_; }
71 
72  const char* unitMeasLabel() const { return unitmeaslbl_;}
73  const UnitOfMeasure* unitOfMeasure() const;
74  void setUnitMeasLabel( const char* s ) { unitmeaslbl_ = s; }
75  void convertTo(const UnitOfMeasure*);
76  PropertyRef::StdType propType() const;
77  bool isCode() const { return iscode_; }
79  static const char* sKeyUnitLbl();
80  static const char* sKeyHdrInfo();
81  static const char* sKeyStorage();
82 
83  float* valArr() { return vals_.arr(); }
84  const float* valArr() const { return vals_.arr(); }
85 
86  IOPar& pars() { return pars_; }
87  const IOPar& pars() const { return pars_; }
88 
89 protected:
90 
94  bool iscode_;
96 
97  void removeAux( int idx ) { vals_.removeSingle(idx); }
98  void eraseAux() { vals_.erase(); }
99  float gtVal(float,int&) const;
100 
101 };
102 
103 } // namespace Well
104 
105 #endif
bool iscode_
Definition: welllog.h:94
#define mExpClass(module)
Definition: commondefs.h:160
BufferString unitmeaslbl_
Definition: welllog.h:93
const Interval< float > & valueRange() const
Definition: welllog.h:70
IOPar pars_
Definition: welllog.h:95
bool isCode() const
log values are all integers stored as floats
Definition: welllog.h:77
Log(const char *nm=0)
Definition: welllog.h:48
const char * unitMeasLabel() const
Definition: welllog.h:72
Well log.
Definition: welllog.h:44
float value(int idx) const
Definition: welllog.h:56
Log(const Log &t)
Definition: welllog.h:52
void setUnitMeasLabel(const char *s)
Definition: welllog.h:74
void eraseAux()
Definition: welllog.h:98
Interval< float > & valueRange()
Definition: welllog.h:69
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Interval< float > range_
Definition: welllog.h:92
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
Definition: directionalsurvey.h:19
Depth/Distance along hole object.
Definition: welldahobj.h:28
void removeAux(int idx)
Definition: welllog.h:97
IOPar & pars()
Definition: welllog.h:86
const float * valArr() const
Definition: welllog.h:84
TypeSet< float > vals_
Definition: welllog.h:91
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
virtual void erase()
Definition: typeset.h:339
const IOPar & pars() const
Definition: welllog.h:87
StdType
Definition: propertyref.h:46
virtual void removeSingle(size_type, bool preserver_order=true)
Definition: typeset.h:500
float * valArr()
Definition: welllog.h:83
Unit of Measure.
Definition: unitofmeasure.h:35

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