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

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