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

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