OpendTect  6.3
stratlayermodel.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: Sep 2010
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "stratmod.h"
15 
16 #include "elasticpropsel.h"
17 #include "propertyref.h"
18 #include "stratlayersequence.h"
19 #include "od_iosfwd.h"
20 
21 
22 namespace Strat
23 {
24 class Layer;
25 class UnitRef;
26 class RefTree;
27 
35 {
36 public:
37 
38  LayerModel();
39  LayerModel( const LayerModel& lm )
40  { *this = lm; }
41  virtual ~LayerModel();
42  LayerModel& operator =(const LayerModel&);
43 
44  bool isEmpty() const { return seqs_.isEmpty(); }
45  bool isValid() const;
46  int size() const { return seqs_.size(); }
47  LayerSequence& sequence( int idx ) { return *seqs_[idx];}
48  const LayerSequence& sequence( int idx ) const { return *seqs_[idx];}
49  Interval<float> zRange() const;
50 
51  void setEmpty();
52  LayerSequence& addSequence();
53  LayerSequence& addSequence(const LayerSequence&);
55  void removeSequence(int);
56 
57  PropertyRefSelection& propertyRefs() { return proprefs_; }
58  const PropertyRefSelection& propertyRefs() const { return proprefs_; }
59  void prepareUse() const;
60 
61  void setElasticPropSel(const ElasticPropSelection&);
62  const ElasticPropSelection& elasticPropSel() const {return elasticpropsel_;}
63 
64  const RefTree& refTree() const;
65 
66  bool read(od_istream&);
67  bool write(od_ostream&,int modnr=0,
68  bool mathpreserve=false) const;
69 
70  static const char* sKeyNrSeqs() {return "Nr Sequences";}
71  static FixedString defSVelStr() { return "DefaultSVel";}
72 
73 protected:
74 
78 
79 };
80 
81 
83 {
84 public:
85 
86  virtual ~LayerModelProvider() {}
87 
88  virtual LayerModel& getCurrent() = 0;
89  virtual LayerModel& getEdited(bool) = 0;
90 
91  const LayerModel& getCurrent() const
92  { return const_cast<LayerModelProvider*>(this)
93  ->getCurrent(); }
94  const LayerModel& getEdited( bool yn ) const
95  { return const_cast<LayerModelProvider*>(this)
96  ->getEdited(yn); }
97 };
98 
99 
100 }; // namespace Strat
#define mExpClass(module)
Definition: commondefs.h:157
ObjectSet< LayerSequence > seqs_
Definition: stratlayermodel.h:75
Definition: propertyref.h:174
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:25
User parameters to compute values for an elastic layer (den,p/s-waves).
Definition: elasticpropsel.h:23
PropertyRefSelection proprefs_
Definition: stratlayermodel.h:76
const LayerSequence & sequence(int idx) const
Definition: stratlayermodel.h:48
A sequence of layers.
Definition: stratlayersequence.h:34
OD::String that holds an existing text string.
Definition: fixedstring.h:27
static const char * sKeyNrSeqs()
Definition: stratlayermodel.h:70
const LayerModel & getCurrent() const
Definition: stratlayermodel.h:91
bool isEmpty() const
Definition: stratlayermodel.h:44
OD class for stream read.
Definition: od_istream.h:23
Set of pointers to objects.
Definition: commontypes.h:28
const ElasticPropSelection & elasticPropSel() const
Definition: stratlayermodel.h:62
const PropertyRefSelection & propertyRefs() const
Definition: stratlayermodel.h:58
PropertyRefSelection & propertyRefs()
Definition: stratlayermodel.h:57
static FixedString defSVelStr()
Definition: stratlayermodel.h:71
ElasticPropSelection elasticpropsel_
Definition: stratlayermodel.h:77
Definition: stratlayermodel.h:82
const LayerModel & getEdited(bool yn) const
Definition: stratlayermodel.h:94
virtual ~LayerModelProvider()
Definition: stratlayermodel.h:86
Stratigraphy.
Definition: stratlevel.h:25
Tree of UnitRef&#39;s.
Definition: stratreftree.h:27
LayerSequence & sequence(int idx)
Definition: stratlayermodel.h:47
int size() const
Definition: stratlayermodel.h:46
A model consisting of layer sequences.
Definition: stratlayermodel.h:34
LayerModel(const LayerModel &lm)
Definition: stratlayermodel.h:39

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