OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "algomod.h"
15 #include "binid.h"
16 #include "bufstring.h"
17 #include "uistring.h"
18 
19 
28 public:
29  BinIDSorting( bool is2d )
30  : is2d_(is2d), state_(0) {}
31 
32  bool isValid(const BinID& prev,const BinID& cur) const;
33  const char* description() const;
34 
35  bool inlSorted() const
36  { return state_ < 4; }
37  bool inlUpward() const
38  { return (state_ % 2) < 1; }
39  bool crlUpward() const
40  { return (state_ % 4) < 2; }
41 
42  void set(bool inl,bool inlupw,bool crlupw);
44 
45  static bool isValid(bool is2d,const BinID& prev,const BinID& cur,
46  bool inlsorted,bool inlupward,bool crlupward);
47  static BufferString description(bool is2d,bool inlsorted,bool inlupward,
48  bool crlupward);
49 
50 protected:
51 
52  friend class BinIDSortingAnalyser;
53 
54  BinIDSorting( bool is2d, int st )
55  : is2d_(is2d), state_(st) {}
56 
57  int state_;
58  bool is2d_;
59 
60 };
61 
62 
69 public:
70  BinIDSortingAnalyser(bool is2d);
71 
72  bool add(const BinID&);
77  uiString errMsg() { return errmsg_; }
78 
79 protected:
80 
82  bool is2d_;
83  bool st_[8];
85 
86 };
87 
BinIDSorting::isValid
static bool isValid(bool is2d, const BinID &prev, const BinID &cur, bool inlsorted, bool inlupward, bool crlupward)
BinIDSorting::is2d_
bool is2d_
Definition: binidsorting.h:58
BinIDSortingAnalyser::add
mODTextTranslationClass(BinIDSortingAnalyser) public bool add(const BinID &)
BinIDSorting::crlUpward
bool crlUpward() const
Definition: binidsorting.h:39
uistring.h
BinIDSorting::state_
int state_
Definition: binidsorting.h:57
BinIDSorting
BinID sorting parameters.
Definition: binidsorting.h:27
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
BinIDSorting::description
static BufferString description(bool is2d, bool inlsorted, bool inlupward, bool crlupward)
binid.h
BinIDSortingAnalyser::errMsg
uiString errMsg()
Definition: binidsorting.h:77
BinIDSortingAnalyser::st_
bool st_[8]
Definition: binidsorting.h:83
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
bufstring.h
BinIDSortingAnalyser::prev_
BinID prev_
Definition: binidsorting.h:81
BinID
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
BinIDSorting::set
void set(bool inl, bool inlupw, bool crlupw)
In 2D, 'inl' is ignored and inlupw irrelevant.
BinIDSorting::description
const char * description() const
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
BinIDSortingAnalyser::getSorting
BinIDSorting getSorting() const
Can be used after add() returns true.
BinIDSortingAnalyser
Analyses whether input BinIDs are sorted.
Definition: binidsorting.h:68
BinIDSorting::mODTextTranslationClass
mODTextTranslationClass(BinIDSorting) public
Definition: binidsorting.h:27
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
MPE::errmsg_
BufferString errmsg_
Definition: horizontracker.h:118
BinIDSorting::isValid
bool isValid(const BinID &prev, const BinID &cur) const
BinIDSorting::inlUpward
bool inlUpward() const
< ignored in 2D
Definition: binidsorting.h:37
BinIDSorting::inlSorted
bool inlSorted() const
Definition: binidsorting.h:35
BinIDSorting::BinIDSorting
BinIDSorting(bool is2d, int st)
Definition: binidsorting.h:54
BinIDSortingAnalyser::errmsg_
uiString errmsg_
Definition: binidsorting.h:84
BinIDSortingAnalyser::is2d_
bool is2d_
Definition: binidsorting.h:82

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