OpendTect-6_4  6.4
stratlayseqattrib.h
Go to the documentation of this file.
1 #ifndef stratlayseqattrib_h
2 #define stratlayseqattrib_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Jan 2011
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "stratmod.h"
17 #include "namedobj.h"
18 #include "enums.h"
19 #include "uistring.h"
20 #include "bufstringset.h"
21 #include "od_iosfwd.h"
22 class PropertyRef;
23 
24 
25 namespace Strat
26 {
27 class LaySeqAttribSet;
28 
39 public:
40 
41  enum Transform { Pow, Log, Exp };
43 
45  const char* nm=0 )
46  : NamedObject(nm)
47  , set_(&s), prop_(p)
48  , islocal_(false)
49  , transform_(Pow)
50  , transformval_(mUdf(float)) {}
51 
52  const PropertyRef& prop_;
53  bool islocal_;
54  BufferString stat_; // either Stats::Type or Stats::UpscaleType
55 
56  // non-local only
59 
62  inline bool hasTransform() const
63  { return !mIsUdf(transformval_); }
64 
65  static const char* sKeyIsLocal() { return "Local"; }
66  static const char* sKeyStats() { return "Statistics"; }
67  static const char* sKeyUnits() { return "Units"; }
68  static const char* sKeyLithos() { return "Lithologies"; }
69  static const char* sKeyTransform() { return "Transform"; }
70 
71  LaySeqAttribSet& attrSet() { return *set_; }
72  const LaySeqAttribSet& attrSet() const { return *set_; }
73  void setAttrSet( LaySeqAttribSet& s ) { set_ = &s; }
74 
75 protected:
76 
78 
79 };
80 
81 
94 public:
95 
96  LaySeqAttribSet( const char* nm=0 )
97  : NamedObject(nm) {}
98 
99  LaySeqAttrib& attr( int idx ) { return *(*this)[idx]; }
100  const LaySeqAttrib& attr( int idx ) const { return *(*this)[idx]; }
101  LaySeqAttrib* attr( const char* nm ) { return gtAttr(nm); }
102  const LaySeqAttrib* attr( const char* nm ) const { return gtAttr(nm); }
103 
104  void getFrom(const IOPar&);
105  void putTo(IOPar&) const;
106  bool getFrom(od_istream&);
107  bool putTo(od_ostream&) const;
108 
109 protected:
110 
111  LaySeqAttrib* gtAttr(const char*) const;
112 
113 };
114 
115 
116 }; // namespace Strat
117 
118 #endif
#define mExpClass(module)
Definition: commondefs.h:160
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
LaySeqAttribSet * set_
Definition: stratlayseqattrib.h:77
Transform
Definition: stratlayseqattrib.h:41
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
void setAttrSet(LaySeqAttribSet &s)
Definition: stratlayseqattrib.h:73
LaySeqAttrib * attr(const char *nm)
Definition: stratlayseqattrib.h:101
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:42
static const char * sKeyIsLocal()
Definition: stratlayseqattrib.h:65
Definition: file.h:99
attribs to extract from layer sequences
Definition: stratlayseqattrib.h:91
Transform transform_
Definition: stratlayseqattrib.h:60
Set of BufferString objects.
Definition: bufstringset.h:28
#define mDeclareEnumUtils(enm)
Some utilities surrounding the often needed enum <-> string table.
Definition: enums.h:258
OD class for stream read.
Definition: od_istream.h:24
LaySeqAttribSet & attrSet()
Definition: stratlayseqattrib.h:71
const LaySeqAttrib * attr(const char *nm) const
Definition: stratlayseqattrib.h:102
static const char * sKeyTransform()
Definition: stratlayseqattrib.h:69
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
bool hasTransform() const
Definition: stratlayseqattrib.h:62
static const char * sKeyStats()
Definition: stratlayseqattrib.h:66
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
const LaySeqAttrib & attr(int idx) const
Definition: stratlayseqattrib.h:100
static const char * sKeyUnits()
Definition: stratlayseqattrib.h:67
BufferStringSet units_
Definition: stratlayseqattrib.h:57
Stratigraphy.
Definition: stratlevel.h:26
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Object with a name.
Definition: namedobj.h:35
BufferString stat_
Definition: stratlayseqattrib.h:54
float Exp(float)
LaySeqAttribSet(const char *nm=0)
Definition: stratlayseqattrib.h:96
bool islocal_
Definition: stratlayseqattrib.h:53
LaySeqAttrib & attr(int idx)
Definition: stratlayseqattrib.h:99
attrib to extract from layer sequences
Definition: stratlayseqattrib.h:37
const LaySeqAttribSet & attrSet() const
Definition: stratlayseqattrib.h:72
ObjectSet where the objects contained are owned by this set.
Definition: manobjectset.h:23
float transformval_
Definition: stratlayseqattrib.h:61
BufferStringSet liths_
Definition: stratlayseqattrib.h:58
static const char * sKeyLithos()
Definition: stratlayseqattrib.h:68

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