OpendTect  6.3
emposid.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: Kristofer Tingdahl
8  Date: 4-11-2002
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "earthmodelmod.h"
15 #include "dbkey.h"
16 #include "rowcol.h"
17 
18 
19 namespace EM
20 {
21 
24 typedef od_int64 SubID;
25 
35 mExpClass(EarthModel) PosID
36 {
37 public:
38  PosID( ObjectID emobjid=0,
39  SectionID sectionid=0,
40  SubID subid=0);
41 
42  static const PosID& udf();
43  bool isUdf() const;
44 
45  const ObjectID& objectID() const;
46  SectionID sectionID() const;
47  SubID subID() const;
48  void setObjectID(const ObjectID&);
49  void setSectionID(SectionID);
50  void setSubID(SubID);
51  RowCol getRowCol() const;
52 
53  bool operator==(const PosID& b) const;
54  bool operator!=(const PosID& b) const;
55 
56  void fillPar( IOPar& ) const;
57  bool usePar( const IOPar& );
58 
59 protected:
60 
61  ObjectID emobjid_;
62  SectionID sectionid_;
63  SubID subid_;
64 
65  static const char* emobjStr();
66  static const char* sectionStr();
67  static const char* subidStr();
68 };
69 
70 
71 inline PosID::PosID( ObjectID emobj, SectionID section, SubID subid )
72  : emobjid_(emobj)
73  , sectionid_(section)
74  , subid_(subid)
75 {}
76 
77 
78 inline bool PosID::operator==(const PosID& b) const
79 { return emobjid_==b.emobjid_ && sectionid_==b.sectionid_ && subid_==b.subid_; }
80 
81 
82 inline bool PosID::operator!=(const PosID& b) const
83 { return !(*this==b); }
84 
85 inline const ObjectID& PosID::objectID() const
86 { return emobjid_; }
87 
88 inline SectionID PosID::sectionID() const
89 { return sectionid_; }
90 
91 inline SubID PosID::subID() const
92 { return subid_; }
93 
94 inline void PosID::setObjectID( const ObjectID& id )
95 { emobjid_ = id; }
96 
97 inline void PosID::setSectionID( SectionID id )
98 { sectionid_ = id; }
99 
100 inline void PosID::setSubID( SubID id )
101 { subid_ = id; }
102 
103 
104 } // namespace EM
od_int16 SectionID
Definition: emposid.h:23
#define mExpClass(module)
Definition: commondefs.h:157
od_int32 ObjectID
Definition: emposid.h:22
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
bool operator==(const PosID &b) const
Definition: emposid.h:78
Is an identifier for each position in the earthmodel.
Definition: emposid.h:35
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
#define od_int64
Definition: plftypes.h:34
SubID subID() const
Definition: emposid.h:91
bool operator!=(const PosID &b) const
Definition: emposid.h:82
od_int64 SubID
Definition: emposid.h:24
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
SectionID sectionid_
Definition: emposid.h:62
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
const ObjectID & objectID() const
Definition: emposid.h:85
#define od_int16
Definition: plftypes.h:25
IdxPair used for its row() and col().
Definition: rowcol.h:23
#define od_int32
Definition: plftypes.h:29
void setObjectID(const ObjectID &)
Definition: emposid.h:94
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:23
SubID subid_
Definition: emposid.h:63
void setSectionID(SectionID)
Definition: emposid.h:97
ObjectID emobjid_
Definition: emposid.h:61
PosID(ObjectID emobjid=0, SectionID sectionid=0, SubID subid=0)
Definition: emposid.h:71
bool isUdf(const T &t)
Definition: undefval.h:241
SectionID sectionID() const
Definition: emposid.h:88
void setSubID(SubID)
Definition: emposid.h:100

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