OpendTect  6.3
binidsorting.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: A.H.Bril
8  Date: Dec 2006
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "algomod.h"
14 #include "binid.h"
15 #include "bufstring.h"
16 #include "uistring.h"
17 
18 
26 { mODTextTranslationClass(BinIDSorting)
27 public:
28  BinIDSorting( bool is2d )
29  : is2d_(is2d), state_(0) {}
30 
31  bool isValid(const BinID& prev,const BinID& cur) const;
32  const char* description() const;
33 
34  bool inlSorted() const
35  { return state_ < 4; }
36  bool inlUpward() const
37  { return (state_ % 2) < 1; }
38  bool crlUpward() const
39  { return (state_ % 4) < 2; }
40 
41  void set(bool inl,bool inlupw,bool crlupw);
43 
44  static bool isValid(bool is2d,const BinID& prev,const BinID& cur,
45  bool inlsorted,bool inlupward,bool crlupward);
46  static BufferString description(bool is2d,bool inlsorted,bool inlupward,
47  bool crlupward);
48 
49 protected:
50 
51  friend class BinIDSortingAnalyser;
52 
53  BinIDSorting( bool is2d, int st )
54  : is2d_(is2d), state_(st) {}
55 
56  int state_;
57  bool is2d_;
58 
59 };
60 
61 
67 { mODTextTranslationClass(BinIDSortingAnalyser)
68 public:
69  BinIDSortingAnalyser(bool is2d);
70 
71  bool add(const BinID&);
74  BinIDSorting getSorting() const;
76  uiString errMsg() { return errmsg_; }
77 
78 protected:
79 
81  bool is2d_;
82  bool st_[8];
84 
85 };
int state_
Definition: binidsorting.h:56
#define mExpClass(module)
Definition: commondefs.h:157
BinIDSorting getSorting() const
Can be used after add() returns true.
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
BinID sorting parameters.
Definition: binidsorting.h:25
bool is2d_
Definition: binidsorting.h:57
uiString errmsg_
Definition: binidsorting.h:83
BinIDSorting(bool is2d, int st)
Definition: binidsorting.h:53
uiString errMsg()
Definition: binidsorting.h:76
bool crlUpward() const
Definition: binidsorting.h:38
Definition: uistring.h:88
bool inlUpward() const
< ignored in 2D
Definition: binidsorting.h:36
mODTextTranslationClass(BinIDSorting) public
Definition: binidsorting.h:26
Analyses whether input BinIDs are sorted.
Definition: binidsorting.h:66
BinID prev_
Definition: binidsorting.h:80
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
BufferString errmsg_
Definition: horizontracker.h:117
mODTextTranslationClass(BinIDSortingAnalyser) public bool add(const BinID &)
bool inlSorted() const
Definition: binidsorting.h:34
bool is2d_
Definition: binidsorting.h:81
bool st_[8]
Definition: binidsorting.h:82

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