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

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