OpendTect  6.3
welllog.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 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "welldahobj.h"
15 #include "ranges.h"
16 #include "iopar.h"
17 #include "unitofmeasure.h"
18 #include "propertyref.h"
19 
20 namespace Well
21 {
22 
40 mExpClass(Well) Log : public RefCount::Referenced
41  , public DahObj
42 {
43 public:
44 
45  Log(const char* nm=0);
48 
49  void setValue(PointID,ValueType);
50  void setValue(IdxType,ValueType);
51  inline void addValue( ZType dh, ValueType val )
52  { setValueAt( dh, val ); }
53 
54  void getValues(ValueSetType&) const;
55  virtual void getData(ZSetType&,ValueSetType&) const;
56  void setValues(const ValueSetType&);
57  void setData(const ZSetType&,const ValueSetType&);
58  // Make sure DAH values are sorted (asc or desc)
59 
60  void removeTopBottomUdfs();
61 
62  mImplSimpleMonitoredGetSet(inline,unitMeasLabel,setUnitMeasLabel,
63  BufferString,unitmeaslbl_,cParsChange())
64  mImplSimpleMonitoredGetSet(inline,pars,setPars,IOPar,pars_,cParsChange())
65  const UnitOfMeasure* unitOfMeasure() const;
66  void applyUnit(const UnitOfMeasure*);
67  void convertTo(const UnitOfMeasure*);
68  PropertyRef::StdType propType() const;
69  mImplSimpleMonitoredGet(valueRange,Interval<ValueType>,valrg_)
70  mImplSimpleMonitoredGet(valsAreCodes,bool,valsarecodes_)
71 
72  static const char* sKeyUnitLbl();
73  static const char* sKeyHdrInfo();
74  static const char* sKeyStorage();
75 
76 protected:
77 
78  ~Log();
79 
80  ValueSetType vals_;
81  BufferString unitmeaslbl_;
82  IOPar pars_;
83  Interval<ValueType> valrg_;
84  bool valsarecodes_;
85 
86  virtual bool doSet(IdxType,ValueType);
87  virtual PointID doInsAtDah(ZType,ValueType);
88  virtual ValueType gtVal( IdxType idx ) const { return vals_[idx]; }
89  virtual void removeAux( IdxType idx ) { vals_.removeSingle(idx); }
90  virtual void eraseAux() { vals_.erase(); }
91 
92  ValueType gtVal(ZType,int&) const;
93  void stVal(IdxType,ValueType);
94 
95  void redoValStats();
96  void updValStats(ValueType);
97  void ensureAscZ();
98 
99 };
100 
101 
105 {
106 public:
107 
108  LogIter(const Log&,bool start_at_end=false);
109  LogIter(const LogIter&);
110 
111  const Log& log() const;
112 
113 };
114 
115 
116 } // namespace Well
#define mExpClass(module)
Definition: commondefs.h:157
Well log.
Definition: welllog.h:40
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:40
Definition: welldahobj.h:134
virtual void eraseAux()
Definition: welllog.h:90
Definition: file.h:109
float ValueType
Definition: welldahobj.h:46
virtual void removeAux(IdxType idx)
Definition: welllog.h:89
#define mImplSimpleMonitoredGet(fnnm, typ, memb)
Defines simple MT-safe copyable member get.
Definition: monitor.h:21
single integer ID with comparison but no automatic conversion. Note that you will want to make a subc...
Definition: integerid.h:47
#define mDeclMonitorableAssignment(clss)
like mDeclAbstractMonitorableAssignment but for non-abstract subclasses. Implements the clone() metho...
Definition: monitor.h:111
Interval of values.
Definition: commontypes.h:27
#define mDeclInstanceCreatedNotifierAccess(clss)
Definition: notify.h:235
size_type IdxType
Definition: welldahobj.h:44
Set of (small) copyable elements.
Definition: commontypes.h:26
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
#define mImplSimpleMonitoredGetSet(pfx, fnnmget, fnnmset, typ, memb, chgtyp)
Defines simple MT-safe copyable member access.
Definition: monitor.h:39
Well Log iterator.
Definition: welllog.h:104
Definition: wellcommon.h:16
object with a geometry defined by depth along hole.
Definition: welldahobj.h:36
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
float ZType
Definition: welldahobj.h:40
void addValue(ZType dh, ValueType val)
Definition: welllog.h:51
Unit of Measure.
Definition: unitofmeasure.h:33

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