OpendTect-6_4  6.4
linekey.h
Go to the documentation of this file.
1 #ifndef linekey_h
2 #define linekey_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Bril
8  Date: Oct 2004
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "generalmod.h"
15 #include "bufstring.h"
16 
17 
22 mExpClass(General) LineKey : public BufferString
23 {
24 public:
25 
26  LineKey( const char* lk=0 )
27  : BufferString(lk) {}
28  LineKey(const char*,const char* attrnm);
29  LineKey( const IOPar& iop, bool liin )
30  { usePar(iop,liin); }
31  bool operator ==(const LineKey&) const;
32  bool operator ==( const char* lk ) const
33  { return *this == LineKey(lk); }
34 
35  BufferString lineName() const;
36  BufferString attrName() const;
37  void setLineName( const char* lnm )
38  { *this = LineKey( lnm, attrName() ); }
39  void setAttrName( const char* anm )
40  { *this = LineKey( lineName(), anm ); }
41 
42  void fillPar(IOPar&,bool linename_is_iopar_name) const;
43  bool usePar(const IOPar&,bool linename_is_iopar_name);
44 
45  static const char* sKeyDefAttrib() { return ""; }
46 };
47 
48 
54 {
55 public:
56 
57  virtual ~GeomIDProvider() {}
58  virtual Pos::GeomID geomID() const = 0;
59 
60 };
61 
62 
63 #endif
#define mExpClass(module)
Definition: commondefs.h:160
LineKey(const char *lk=0)
Definition: linekey.h:26
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
void setAttrName(const char *anm)
Definition: linekey.h:39
void setLineName(const char *lnm)
Definition: linekey.h:37
Key for a line in a line set.
Definition: linekey.h:22
virtual ~GeomIDProvider()
Definition: linekey.h:57
Class providing a current line key.
Definition: linekey.h:53
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
LineKey(const IOPar &iop, bool liin)
Definition: linekey.h:29
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Index_Type GeomID
Definition: commontypes.h:52
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
static const char * sKeyDefAttrib()
Definition: linekey.h:45
FixedString LineKey()
Definition: keystrs.h:82

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