OpendTect  6.3
stratunitrefiter.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: Dec 2003 / Sep 2010
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "stratmod.h"
15 #include "stratunitref.h"
16 
17 
18 namespace Strat
19 {
20 
29 {
30 public:
31 
32  enum Pol { All, Leaves, AllNodes, LeavedNodes, NodesOnly };
33  static Pol polOf(UnitRef::Type);
34  static Pol polOf(const UnitRef*);
35 
36  UnitRefIter(const NodeUnitRef&,Pol p=All);
37  UnitRefIter( const UnitRefIter& uri ) { *this = uri; }
38  UnitRefIter& operator =(const UnitRefIter&);
39 
40  void reset();
41  bool next();
42  UnitRef* unit() { return gtUnit(); }
43  const UnitRef* unit() const { return gtUnit(); }
44  Pol pol() const { return pol_; }
45  void setPol( Pol p ) { pol_ = p; reset(); }
46  Interval<int> levelRange() const;
47 
48  static bool isValid(const UnitRef&,Pol);
49 
50 protected:
51 
55  int curidx_;
56 
57  UnitRef* gtUnit() const;
58  bool toNext();
59 
60 };
61 
62 } // namespace
#define mExpClass(module)
Definition: commondefs.h:157
void setPol(Pol p)
Definition: stratunitrefiter.h:45
Pol pol_
Definition: stratunitrefiter.h:52
NodeUnitRef * itnode_
Definition: stratunitrefiter.h:53
UnitRefIter(const UnitRefIter &uri)
Definition: stratunitrefiter.h:37
const UnitRef * unit() const
Definition: stratunitrefiter.h:43
UnitRef for units containing other units only.
Definition: stratunitref.h:120
Iterator on Ref Nodes.
Definition: stratunitrefiter.h:28
FixedString All()
Definition: keystrs.h:34
Reference data for a stratigraphic unit.
Definition: stratunitref.h:36
Type
Definition: stratunitref.h:40
Stratigraphy.
Definition: stratlevel.h:25
NodeUnitRef * curnode_
Definition: stratunitrefiter.h:54
UnitRef * unit()
Definition: stratunitrefiter.h:42
Pol pol() const
Definition: stratunitrefiter.h:44
Pol
Definition: stratunitrefiter.h:32
int curidx_
Definition: stratunitrefiter.h:55

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