OpendTect-6_4  6.4
emposid.h
Go to the documentation of this file.
1 #ifndef emposid_h
2 #define emposid_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "multiid.h"
18 #include "rowcol.h"
19 
20 
21 namespace EM
22 {
23 
26 typedef od_int64 SubID;
27 
37 mExpClass(EarthModel) PosID
38 {
39 public:
40  PosID( ObjectID emobjid=0,
41  SectionID sectionid=0,
42  SubID subid=0);
43 
44  static const PosID& udf();
45  bool isUdf() const;
46 
47  const ObjectID& objectID() const;
48  SectionID sectionID() const;
49  SubID subID() const;
50  void setObjectID(const ObjectID&);
51  void setSectionID(SectionID);
52  void setSubID(SubID);
53  RowCol getRowCol() const;
54 
55  bool operator==(const PosID& b) const;
56  bool operator!=(const PosID& b) const;
57 
58  void fillPar( IOPar& ) const;
59  bool usePar( const IOPar& );
60 
61 protected:
62 
63  ObjectID emobjid_;
64  SectionID sectionid_;
65  SubID subid_;
66 
67  static const char* emobjStr();
68  static const char* sectionStr();
69  static const char* subidStr();
70 };
71 
72 
73 inline PosID::PosID( ObjectID emobj, SectionID section, SubID subid )
74  : emobjid_(emobj)
75  , sectionid_(section)
76  , subid_(subid)
77 {}
78 
79 
80 inline bool PosID::operator==(const PosID& b) const
81 { return emobjid_==b.emobjid_ && sectionid_==b.sectionid_ && subid_==b.subid_; }
82 
83 
84 inline bool PosID::operator!=(const PosID& b) const
85 { return !(*this==b); }
86 
87 inline const ObjectID& PosID::objectID() const
88 { return emobjid_; }
89 
90 inline SectionID PosID::sectionID() const
91 { return sectionid_; }
92 
93 inline SubID PosID::subID() const
94 { return subid_; }
95 
96 inline void PosID::setObjectID( const ObjectID& id )
97 { emobjid_ = id; }
98 
99 inline void PosID::setSectionID( SectionID id )
100 { sectionid_ = id; }
101 
102 inline void PosID::setSubID( SubID id )
103 { subid_ = id; }
104 
105 
106 } // namespace EM
107 
108 
109 #endif
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
od_int32 ObjectID
Definition: emposid.h:24
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
bool operator==(const PosID &b) const
Definition: emposid.h:80
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
SubID subID() const
Definition: emposid.h:93
bool operator!=(const PosID &b) const
Definition: emposid.h:84
od_int64 SubID
Definition: emposid.h:26
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
SectionID sectionid_
Definition: emposid.h:64
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
const ObjectID & objectID() const
Definition: emposid.h:87
#define od_int16
Definition: plftypes.h:27
IdxPair used for its row() and col().
Definition: rowcol.h:25
#define od_int32
Definition: plftypes.h:31
void setObjectID(const ObjectID &)
Definition: emposid.h:96
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
SubID subid_
Definition: emposid.h:65
void setSectionID(SectionID)
Definition: emposid.h:99
ObjectID emobjid_
Definition: emposid.h:63
PosID(ObjectID emobjid=0, SectionID sectionid=0, SubID subid=0)
Definition: emposid.h:73
bool isUdf(const T &t)
Definition: undefval.h:243
SectionID sectionID() const
Definition: emposid.h:90
void setSubID(SubID)
Definition: emposid.h:102

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