OpendTect  6.6
stratlaygen.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
8  Date: June 2011
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "stratmod.h"
16 #include "property.h"
17 
18 
19 namespace Strat
20 {
21 class RefTree;
22 class LayerSequence;
23 class LayerSequenceGenDesc;
24 
35 {
36 public:
37 
38  virtual ~LayerGenerator() {}
39 
40  virtual LayerGenerator* clone() const
41  { return canBeCloned() ? createClone() : 0; }
42  virtual bool canBeCloned() const = 0;
43  virtual const char* name() const = 0;
44  virtual float dispThickness(bool max=false) const = 0;
45 
46  virtual bool usePar(const IOPar&,const RefTree&);
47  virtual void fillPar(IOPar&) const;
48 
49  static LayerGenerator* get(const IOPar&,const RefTree&);
51 
54 
55  virtual bool reset() const { return true; }
56  virtual uiString errMsg() const { return uiString::emptyString(); }
57  virtual void syncProps(const PropertyRefSelection&) = 0;
58  virtual void updateUsedProps(PropertyRefSelection&) const = 0;
59 
60  void setGenDesc( LayerSequenceGenDesc* gd ) { gendesc_=gd; }
61 
62 protected:
63 
64  virtual LayerGenerator* createClone() const { return 0; }
66  = 0;
67  virtual bool postProcess(LayerSequence&,float pos) const
68  { return true; }
69 
71  friend class LayerSequenceGenDesc;
72 
73 };
74 
75 
76 #define mDefLayerGeneratorFns(clss,typstr) \
77 protected: \
78  virtual bool genMaterial(Strat::LayerSequence&, \
79  Property::EvalOpts eo=Property::EvalOpts()) const; \
80 public: \
81  static const char* typeStr() { return typstr; } \
82  virtual const char* factoryKeyword() const { return typeStr(); } \
83  static Strat::LayerGenerator* create() { return new clss; } \
84  static void initClass() { factory().addCreator(create,typeStr());} \
85  virtual const char* name() const; \
86  virtual float dispThickness(bool max=true) const; \
87  virtual bool usePar(const IOPar&,const Strat::RefTree&); \
88  virtual void fillPar(IOPar&) const; \
89  virtual void syncProps(const PropertyRefSelection&); \
90  virtual void updateUsedProps(PropertyRefSelection&) const
91 
92 
93 
94 }; // namespace Strat
95 
Strat::LayerGenerator::errMsg
virtual uiString errMsg() const
Definition: stratlaygen.h:56
Strat::LayerGenerator::syncProps
virtual void syncProps(const PropertyRefSelection &)=0
Strat::LayerGenerator::dispThickness
virtual float dispThickness(bool max=false) const =0
property.h
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Strat::LayerGenerator::postProcess
virtual bool postProcess(LayerSequence &, float pos) const
Definition: stratlaygen.h:67
Strat::LayerGenerator::mDefineFactoryInClass
mDefineFactoryInClass(LayerGenerator, factory)
Strat::LayerGenerator::reset
virtual bool reset() const
Definition: stratlaygen.h:55
Strat::LayerGenerator::name
virtual const char * name() const =0
Strat::LayerGenerator::canBeCloned
virtual bool canBeCloned() const =0
Strat::LayerGenerator::usePar
virtual bool usePar(const IOPar &, const RefTree &)
Strat::RefTree
Tree of UnitRef's
Definition: stratreftree.h:29
Property::EvalOpts
Definition: property.h:67
PropertyRefSelection
Definition: propertyref.h:166
Strat::LayerGenerator::clone
virtual LayerGenerator * clone() const
Definition: stratlaygen.h:40
Strat::LayerSequenceGenDesc
Collection of LayerGenerator's that can generate a full LayerSequence.
Definition: stratlayseqgendesc.h:39
Strat::LayerSequence
A sequence of layers.
Definition: stratlayersequence.h:36
Strat::LayerGenerator
Description that can generate layers and add these to a sequence.
Definition: stratlaygen.h:35
Strat::LayerGenerator::setGenDesc
void setGenDesc(LayerSequenceGenDesc *gd)
Definition: stratlaygen.h:60
Strat::LayerGenerator::generateMaterial
bool generateMaterial(LayerSequence &, Property::EvalOpts eo=Property::EvalOpts()) const
Strat::LayerGenerator::updateUsedProps
virtual void updateUsedProps(PropertyRefSelection &) const =0
Strat::LayerGenerator::gendesc_
const LayerSequenceGenDesc * gendesc_
set before generation
Definition: stratlaygen.h:70
Strat::LayerGenerator::genMaterial
virtual bool genMaterial(LayerSequence &, Property::EvalOpts) const =0
Strat::LayerGenerator::fillPar
virtual void fillPar(IOPar &) const
Strat
Stratigraphy.
Definition: stratlevel.h:26
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
uiString::emptyString
static const uiString & emptyString()
Definition: uistring.h:300
Strat::LayerGenerator::createClone
virtual LayerGenerator * createClone() const
Definition: stratlaygen.h:64
Strat::LayerGenerator::get
static LayerGenerator * get(const IOPar &, const RefTree &)
Strat::LayerGenerator::~LayerGenerator
virtual ~LayerGenerator()
Definition: stratlaygen.h:38
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55

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