OpendTect-6_4  6.4
binidsorting.h
Go to the documentation of this file.
1 #ifndef binidsorting_h
2 #define binidsorting_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H.Bril
9  Date: Dec 2006
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "algomod.h"
16 #include "binid.h"
17 #include "bufstring.h"
18 #include "uistring.h"
19 
20 
28 { mODTextTranslationClass(BinIDSorting)
29 public:
30  BinIDSorting( bool is2d )
31  : is2d_(is2d), state_(0) {}
32 
33  bool isValid(const BinID& prev,const BinID& cur) const;
34  const char* description() const;
35 
36  bool inlSorted() const
37  { return state_ < 4; }
38  bool inlUpward() const
39  { return (state_ % 2) < 1; }
40  bool crlUpward() const
41  { return (state_ % 4) < 2; }
42 
43  void set(bool inl,bool inlupw,bool crlupw);
45 
46  static bool isValid(bool is2d,const BinID& prev,const BinID& cur,
47  bool inlsorted,bool inlupward,bool crlupward);
48  static BufferString description(bool is2d,bool inlsorted,bool inlupward,
49  bool crlupward);
50 
51 protected:
52 
53  friend class BinIDSortingAnalyser;
54 
55  BinIDSorting( bool is2d, int st )
56  : is2d_(is2d), state_(st) {}
57 
58  int state_;
59  bool is2d_;
60 
61 };
62 
63 
69 { mODTextTranslationClass(BinIDSortingAnalyser)
70 public:
71  BinIDSortingAnalyser(bool is2d);
72 
73  bool add(const BinID&);
76  BinIDSorting getSorting() const;
78  uiString errMsg() { return errmsg_; }
79 
80 protected:
81 
83  bool is2d_;
84  bool st_[8];
86 
87 };
88 
89 #endif
int state_
Definition: binidsorting.h:58
#define mExpClass(module)
Definition: commondefs.h:160
BinIDSorting getSorting() const
Can be used after add() returns true.
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
BinID sorting parameters.
Definition: binidsorting.h:27
bool is2d_
Definition: binidsorting.h:59
uiString errmsg_
Definition: binidsorting.h:85
BinIDSorting(bool is2d, int st)
Definition: binidsorting.h:55
uiString errMsg()
Definition: binidsorting.h:78
bool crlUpward() const
Definition: binidsorting.h:40
Definition: uistring.h:89
bool inlUpward() const
< ignored in 2D
Definition: binidsorting.h:38
mODTextTranslationClass(BinIDSorting) public
Definition: binidsorting.h:28
Analyses whether input BinIDs are sorted.
Definition: binidsorting.h:68
BinID prev_
Definition: binidsorting.h:82
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
BufferString errmsg_
Definition: horizontracker.h:119
mODTextTranslationClass(BinIDSortingAnalyser) public bool add(const BinID &)
bool inlSorted() const
Definition: binidsorting.h:36
bool is2d_
Definition: binidsorting.h:83
bool st_[8]
Definition: binidsorting.h:84

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