OpendTect-6_4  6.4
welllogset.h
Go to the documentation of this file.
1 #ifndef welllogset_h
2 #define welllogset_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 "position.h"
18 #include "ranges.h"
19 #include "propertyref.h"
20 class BufferStringSet;
21 
22 
23 namespace Well
24 {
25 
26 class Log;
27 
33 {
34 public:
35 
36  LogSet() { init(); }
37  virtual ~LogSet() { setEmpty(); }
38 
39  void getNames(BufferStringSet&) const;
40 
41  int size() const { return logs_.size(); }
42  Log& getLog( int idx ) { return *logs_[idx]; }
43  const Log& getLog( int idx ) const { return *logs_[idx]; }
44  int indexOf(const char*) const;
45  bool isPresent(const char*) const;
46  const Log* getLog( const char* nm ) const { return gtLog(nm); }
47  Log* getLog( const char* nm ) { return gtLog(nm); }
48 
49  Interval<float> dahInterval() const { return dahintv_; }
51  void updateDahIntvs();
53  void removeTopBottomUdfs();
54 
55  void add(Log*);
56  Log* remove(int);
57  void swap(int idx0,int idx1) { logs_.swap( idx0, idx1 ); }
58  bool validIdx(int idx) const { return logs_.validIdx(idx); }
59 
60  bool isEmpty() const { return size() == 0; }
61  void setEmpty();
62 
64  const PropertyRef* altpr=0,
65  BoolTypeSet* isalt=0) const;
66 
67 protected:
68 
71 
72  void init()
73  { dahintv_.start = mSetUdf(dahintv_.stop); }
74 
75  void updateDahIntv(const Well::Log&);
76 
77  Log* gtLog( const char* nm ) const
78  { const int idx = indexOf(nm);
79  return idx < 0 ? 0 : const_cast<Log*>(logs_[idx]); }
80 
81 };
82 
83 } // namespace Well
84 
85 #endif
void init()
Definition: welllogset.h:72
#define mExpClass(module)
Definition: commondefs.h:160
#define mSetUdf(val)
Use this macro to set simple types to undefined.
Definition: undefval.h:274
bool isEmpty() const
Definition: welllogset.h:60
Well log.
Definition: welllog.h:44
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:42
LogSet()
Definition: welllogset.h:36
bool init()
Definition: file.h:99
Log set.
Definition: welllogset.h:32
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
Set of pointers to objects.
Definition: commontypes.h:32
bool validIdx(int idx) const
Definition: welllogset.h:58
int size() const
Definition: welllogset.h:41
Definition: directionalsurvey.h:19
void swap(int idx0, int idx1)
Definition: welllogset.h:57
Log & getLog(int idx)
Definition: welllogset.h:42
const Log & getLog(int idx) const
Definition: welllogset.h:43
Log * gtLog(const char *nm) const
Definition: welllogset.h:77
Log * getLog(const char *nm)
Definition: welllogset.h:47
ObjectSet< Log > logs_
Definition: welllogset.h:69
T stop
Definition: ranges.h:93
Interval< float > dahintv_
Definition: welllogset.h:70
T start
Definition: ranges.h:92
StdType
Definition: propertyref.h:46
Interval< float > dahInterval() const
not def if start == undef
Definition: welllogset.h:49
const Log * getLog(const char *nm) const
Definition: welllogset.h:46
virtual ~LogSet()
Definition: welllogset.h:37

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