OpendTect  6.3
attribdescid.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: Bert Bril
8  Date: July 2005
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "attributeenginemod.h"
14 #include "gendefs.h"
15 
16 namespace Attrib
17 {
18 
25 mExpClass(AttributeEngine) DescID
26 {
27 public:
29  : id_(-1)
30  , isstored_(false) {}
31  DescID( int id, bool isstored )
32  : id_(id)
33  , isstored_(isstored) {}
34  DescID( const DescID& id )
35  : id_(id.id_)
36  , isstored_(id.isstored_) {}
37  inline DescID& operator =( const DescID& id )
38  { id_ = id.id_; isstored_ = id.isstored_; return *this;}
39  inline bool isValid() const { return id_ >= 0; }
40  inline bool isUnselInvalid() const { return id_ < -2; }
41 
42  /*
43  inline bool operator <(int id) const
44  { return id_ < id; }
45  inline bool operator >(int id) const
46  { return id_ > id; }
47  inline bool operator >=(int id) const
48  { return id_ >= id; }
49  */
50 
51  inline bool operator ==( const DescID& id ) const
52  { return id.id_ == id_ && isstored_ == id.isstored_; }
53  inline bool operator !=( const DescID& id ) const
54  { return id.id_ != id_ || isstored_ != id.isstored_;; }
55 
56  static inline DescID undef() { return DescID(-1,false); }
57 
58  int asInt() const { return id_; }
59  int& asInt() { return id_; }
60  bool isStored() const { return isstored_; }
61  void setStored( bool yn ) { isstored_ = yn; }
62 
63 protected:
64 
65  int id_;
66  bool isstored_;
67 };
68 
69 } // namespace Attrib
#define mExpClass(module)
Definition: commondefs.h:157
bool isstored_
Definition: attribdescid.h:66
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
int & asInt()
Definition: attribdescid.h:59
int asInt() const
Definition: attribdescid.h:58
bool isValid() const
Definition: attribdescid.h:39
AttribDesc ID: each Desc has a unique ID in a set; the boolean isstored allows us to know whether thi...
Definition: attribdescid.h:25
int id_
Definition: attribdescid.h:65
bool isUnselInvalid() const
Definition: attribdescid.h:40
bool isStored() const
Definition: attribdescid.h:60
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
static DescID undef()
Definition: attribdescid.h:56
DescID()
Definition: attribdescid.h:28
DescID(const DescID &id)
Definition: attribdescid.h:34
void setStored(bool yn)
Definition: attribdescid.h:61
DescID(int id, bool isstored)
Definition: attribdescid.h:31
Semblance Attribute.
Definition: attribdataholder.h:21

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