OpendTect  6.6
datacoldef.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: A.H.Bril
8  Date: Jan 2005
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "generalmod.h"
15 #include "bufstring.h"
16 class UnitOfMeasure;
17 
18 
29 {
30 public:
31  DataColDef( const char* nm, const char* ref=0,
32  const UnitOfMeasure* un=0 )
33  : name_(nm), ref_(ref), unit_(un) {}
34  bool operator ==( const DataColDef& dcd ) const
35  { return name_ == dcd.name_
36  && ref_ == dcd.ref_
37  && unit_ == dcd.unit_; }
38 
42 
43  enum MatchLevel { Exact, Start, None };
44  MatchLevel compare(const DataColDef&,bool use_name) const;
46 
47  void putTo(BufferString&) const;
48  void getFrom(const char*);
49 
50  static const DataColDef& unknown();
51 
52 };
53 
54 
DataColDef::DataColDef
DataColDef(const char *nm, const char *ref=0, const UnitOfMeasure *un=0)
Definition: datacoldef.h:31
DataColDef::Start
@ Start
Definition: datacoldef.h:43
DataColDef::unit_
const UnitOfMeasure * unit_
Definition: datacoldef.h:41
DataColDef::putTo
void putTo(BufferString &) const
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
operator==
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
bufstring.h
NamedObject::name_
BufferString name_
Definition: namedobj.h:62
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Network::None
@ None
Definition: networkcommon.h:33
UnitOfMeasure
Unit of Measure.
Definition: unitofmeasure.h:35
DataColDef::compare
MatchLevel compare(const DataColDef &, bool use_name) const
if !use_name, matches ref_ .
DataColDef::MatchLevel
MatchLevel
Definition: datacoldef.h:43
DataColDef::ref_
BufferString ref_
Definition: datacoldef.h:40
DataColDef::name_
BufferString name_
Definition: datacoldef.h:39
DataColDef::getFrom
void getFrom(const char *)
DataColDef::unknown
static const DataColDef & unknown()
DataColDef
Column definition in tabular data sets.
Definition: datacoldef.h:29

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