OpendTect-6_4  6.4
attribdescid.h
Go to the documentation of this file.
1 #ifndef attribdescid_h
2 #define attribdescid_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert Bril
9  Date: July 2005
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "attributeenginemod.h"
16 #include "gendefs.h"
17 
18 namespace Attrib
19 {
20 
27 mExpClass(AttributeEngine) DescID
28 {
29 public:
31  : id_(-1)
32  , isstored_(false) {}
33  DescID( int id, bool isstored )
34  : id_(id)
35  , isstored_(isstored) {}
36  DescID( const DescID& id )
37  : id_(id.id_)
38  , isstored_(id.isstored_) {}
39  inline DescID& operator =( const DescID& id )
40  { id_ = id.id_; isstored_ = id.isstored_; return *this;}
41  inline bool isValid() const { return id_ >= 0; }
42  inline bool isUnselInvalid() const { return id_ < -2; }
43 
44  /*
45  inline bool operator <(int id) const
46  { return id_ < id; }
47  inline bool operator >(int id) const
48  { return id_ > id; }
49  inline bool operator >=(int id) const
50  { return id_ >= id; }
51  */
52 
53  inline bool operator ==( const DescID& id ) const
54  { return id.id_ == id_ && isstored_ == id.isstored_; }
55  inline bool operator !=( const DescID& id ) const
56  { return id.id_ != id_ || isstored_ != id.isstored_;; }
57 
58  static inline DescID undef() { return DescID(-1,false); }
59 
60  int asInt() const { return id_; }
61  int& asInt() { return id_; }
62  bool isStored() const { return isstored_; }
63  void setStored( bool yn ) { isstored_ = yn; }
64 
65 protected:
66 
67  int id_;
68  bool isstored_;
69 };
70 
71 } // namespace Attrib
72 
73 #endif
#define mExpClass(module)
Definition: commondefs.h:160
bool isstored_
Definition: attribdescid.h:68
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
int & asInt()
Definition: attribdescid.h:61
int asInt() const
Definition: attribdescid.h:60
bool isValid() const
Definition: attribdescid.h:41
AttribDesc ID: each Desc has a unique ID in a set; the boolean isstored allows us to know whether thi...
Definition: attribdescid.h:27
int id_
Definition: attribdescid.h:67
bool isUnselInvalid() const
Definition: attribdescid.h:42
bool isStored() const
Definition: attribdescid.h:62
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
static DescID undef()
Definition: attribdescid.h:58
DescID()
Definition: attribdescid.h:30
DescID(const DescID &id)
Definition: attribdescid.h:36
void setStored(bool yn)
Definition: attribdescid.h:63
DescID(int id, bool isstored)
Definition: attribdescid.h:33
Semblance Attribute.
Definition: attribdataholder.h:25

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