OpendTect  6.6
welllogset.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 
15 #include "wellmod.h"
16 #include "position.h"
17 #include "ranges.h"
18 #include "propertyref.h"
19 class BufferStringSet;
20 
21 
22 namespace Well
23 {
24 
25 class Log;
26 
32 {
33 public:
34 
35  LogSet() { init(); }
36  virtual ~LogSet() { setEmpty(); }
37 
38  mDeprecated("Specify onlyloaded")
39  void getNames(BufferStringSet&) const;
40  void getNames(BufferStringSet&,bool onlyloaded) const;
41 
42  int size() const { return logs_.size(); }
43  Log& getLog( int idx ) { return *logs_[idx]; }
44  const Log& getLog( int idx ) const { return *logs_[idx]; }
45  int indexOf(const char*) const;
46  bool isLoaded(const char*) const;
47  bool isPresent(const char*) const;
48  const Log* getLog( const char* nm ) const { return gtLog(nm); }
49  Log* getLog( const char* nm ) { return gtLog(nm); }
50 
51  Interval<float> dahInterval() const { return dahintv_; }
56 
57  void add(Log*);
58  Log* remove(int);
59  void swap(int idx0,int idx1) { logs_.swap( idx0, idx1 ); }
60  bool validIdx(int idx) const { return logs_.validIdx(idx); }
61 
62  bool isEmpty() const { return size() == 0; }
63  void setEmpty();
64 
66  const PropertyRef* altpr=0,
67  BoolTypeSet* isalt=0) const;
68 
69 protected:
70 
73 
74  void init()
75  { dahintv_.start = mSetUdf(dahintv_.stop); }
76 
77  void updateDahIntv(const Well::Log&);
78 
79  Log* gtLog( const char* nm ) const
80  { const int idx = indexOf(nm);
81  return idx < 0 ? 0 : const_cast<Log*>(logs_[idx]); }
82 
83 };
84 
85 } // namespace Well
86 
Strat::init
void init()
Well::LogSet::~LogSet
virtual ~LogSet()
Definition: welllogset.h:36
Well::LogSet::init
void init()
Definition: welllogset.h:74
ObjectSet
Set of pointers to objects.
Definition: commontypes.h:31
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Well::LogSet::LogSet
LogSet()
Definition: welllogset.h:35
Well::LogSet::getLog
const Log & getLog(int idx) const
Definition: welllogset.h:44
Well::LogSet::gtLog
Log * gtLog(const char *nm) const
Definition: welllogset.h:79
Well::LogSet::validIdx
bool validIdx(int idx) const
Definition: welllogset.h:60
Well::LogSet::isLoaded
bool isLoaded(const char *) const
Well::LogSet::removeTopBottomUdfs
void removeTopBottomUdfs()
Well::LogSet::add
void add(Log *)
becomes mine
Well::LogSet::dahInterval
Interval< float > dahInterval() const
not def if start == undef
Definition: welllogset.h:51
mSetUdf
#define mSetUdf(val)
Use this macro to set simple types to undefined.
Definition: undefval.h:276
Well::LogSet::updateDahIntv
void updateDahIntv(const Well::Log &)
Well
Definition: directionalsurvey.h:20
Well::LogSet::isPresent
bool isPresent(const char *) const
indexOf
BufferStringSet::idx_type indexOf(const BufferStringSet &, const char *)
Well::LogSet::swap
void swap(int idx0, int idx1)
Definition: welllogset.h:59
Well::LogSet::indexOf
int indexOf(const char *) const
Well::LogSet::mDeprecated
mDeprecated("Specify onlyloaded") void getNames(BufferStringSet &) const
Well::LogSet::getLog
Log & getLog(int idx)
Definition: welllogset.h:43
Well::LogSet::setEmpty
void setEmpty()
Well::LogSet::getLog
Log * getLog(const char *nm)
Definition: welllogset.h:49
File::Log
@ Log
Definition: file.h:122
position.h
propertyref.h
Well::Log
Well log.
Definition: welllog.h:44
PropertyRef
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:43
Well::LogSet::getLog
const Log * getLog(const char *nm) const
Definition: welllogset.h:48
Well::LogSet
Log set.
Definition: welllogset.h:32
Well::LogSet::isEmpty
bool isEmpty() const
Definition: welllogset.h:62
PropertyRef::StdType
StdType
Definition: propertyref.h:46
Well::LogSet::dahintv_
Interval< float > dahintv_
Definition: welllogset.h:72
ranges.h
Well::LogSet::logs_
ObjectSet< Log > logs_
Definition: welllogset.h:71
Well::LogSet::updateDahIntvs
void updateDahIntvs()
if logs changed
Interval< float >
Well::LogSet::remove
Log * remove(int)
becomes yours
TypeSet< int >
Well::LogSet::getSuitable
TypeSet< int > getSuitable(PropertyRef::StdType, const PropertyRef *altpr=0, BoolTypeSet *isalt=0) const

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