OpendTect-6_4  6.4
stratunitrefiter.h
Go to the documentation of this file.
1 #ifndef stratunitrefiter_h
2 #define stratunitrefiter_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Dec 2003 / Sep 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "stratmod.h"
17 #include "stratunitref.h"
18 
19 
20 namespace Strat
21 {
22 
31 {
32 public:
33 
34  enum Pol { All, Leaves, AllNodes, LeavedNodes, NodesOnly };
35  static Pol polOf(UnitRef::Type);
36  static Pol polOf(const UnitRef*);
37 
38  UnitRefIter(const NodeUnitRef&,Pol p=All);
39  UnitRefIter( const UnitRefIter& uri ) { *this = uri; }
40  UnitRefIter& operator =(const UnitRefIter&);
41 
42  void reset();
43  bool next();
44  UnitRef* unit() { return gtUnit(); }
45  const UnitRef* unit() const { return gtUnit(); }
46  Pol pol() const { return pol_; }
47  void setPol( Pol p ) { pol_ = p; reset(); }
48  Interval<int> levelRange() const;
49 
50  static bool isValid(const UnitRef&,Pol);
51 
52 protected:
53 
57  int curidx_;
58 
59  UnitRef* gtUnit() const;
60  bool toNext();
61 
62 };
63 
64 } // namespace
65 
66 #endif
#define mExpClass(module)
Definition: commondefs.h:160
void setPol(Pol p)
Definition: stratunitrefiter.h:47
Pol pol_
Definition: stratunitrefiter.h:54
NodeUnitRef * itnode_
Definition: stratunitrefiter.h:55
UnitRefIter(const UnitRefIter &uri)
Definition: stratunitrefiter.h:39
const UnitRef * unit() const
Definition: stratunitrefiter.h:45
UnitRef for units containing other units only.
Definition: stratunitref.h:118
Iterator on Ref Nodes.
Definition: stratunitrefiter.h:30
FixedString All()
Definition: keystrs.h:36
Reference data for a stratigraphic unit.
Definition: stratunitref.h:38
Type
Definition: stratunitref.h:42
Stratigraphy.
Definition: stratlevel.h:26
NodeUnitRef * curnode_
Definition: stratunitrefiter.h:56
UnitRef * unit()
Definition: stratunitrefiter.h:44
Pol pol() const
Definition: stratunitrefiter.h:46
Pol
Definition: stratunitrefiter.h:34
int curidx_
Definition: stratunitrefiter.h:57

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