OpendTect  6.6
commontypes.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: Bert/Salil
8  Date: Oct 2013
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 */
13 
14 #ifndef commondefs_h
15 # include "commondefs.h"
16 #endif
17 
18 class IOPar;
19 class Color;
20 class BinID;
21 class Coord;
22 class Coord3;
23 class TrcKey;
24 class IdxPair;
25 class MultiID;
26 class FixedString;
27 class BufferString;
28 namespace OD { class String; }
29 template<class T> class TypeSet;
30 template<class T> class Interval;
31 template<class T> class ObjectSet;
32 template<class T> class StepInterval;
33 
37 typedef unsigned short PortNr_Type;
39 
41 enum Pol2D3D { Only3D=-1, Both2DAnd3D=0, Only2D=1 };
42 
43 namespace OD
44 {
46  { GeomSynth=-2, Geom3D=-1, Geom2D=0 };
47 
50 
51 template <class T> DataRepType GetDataRepType() { return AutoDataRep; }
52 # define mDefDataRepTypeGetFn( ctyp, drtyp ) \
53 template <> inline DataRepType GetDataRepType<ctyp>() { return drtyp; }
54 mDefDataRepTypeGetFn( signed char, SI8 )
55 mDefDataRepTypeGetFn( unsigned char, UI8 )
64 
65 inline DataRepType GetDataRepType( bool isfp, bool issigned, int nbytes )
66 {
67  if ( isfp )
68  return nbytes>4 ? F64 : F32;
69  if ( issigned )
70  return nbytes<2 ? SI8 : (nbytes>4 ? SI64 : (nbytes==2 ? SI16 : SI32));
71  else
72  return nbytes<2 ? UI8 : (nbytes>4 ? SI64 : (nbytes==2 ? UI16 : UI32));
73 }
74 } // namespace OD
75 
76 
77 namespace Pos
78 {
79 
80 class IdxPair;
81 
89 
90 typedef double Ordinate_Type;
91 typedef double Distance_Type;
92 
93 }
94 
od_uint64
#define od_uint64
Definition: plftypes.h:36
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
OD::SI16
@ SI16
Definition: commontypes.h:49
Pos
Position.
Definition: commontypes.h:78
OD::F64
@ F64
Definition: commontypes.h:49
ObjectSet
Set of pointers to objects.
Definition: commontypes.h:31
Pos::Index_Delta_Type
::Index_Type Index_Delta_Type
Definition: commontypes.h:83
OD::GetDataRepType
DataRepType GetDataRepType()
Definition: commontypes.h:51
commondefs.h
od_int64
#define od_int64
Definition: plftypes.h:35
OD
OpendTect.
Definition: commontypes.h:28
Pos::Index_Type
::Index_Type Index_Type
Definition: commontypes.h:80
OD::SI32
@ SI32
Definition: commontypes.h:49
Pos::SurvID
Index_Type SurvID
Definition: commontypes.h:84
PID_Type
od_int32 PID_Type
Definition: commontypes.h:38
CaseInsensitive
@ CaseInsensitive
Definition: commontypes.h:40
Pos::Distance_Type
double Distance_Type
Definition: commontypes.h:91
Index_Delta_Type
od_int32 Index_Delta_Type
Definition: commontypes.h:35
Pos::LineID
Index_Type LineID
Definition: commontypes.h:85
Pos::GeomIDSet
TypeSet< GeomID > GeomIDSet
Definition: commontypes.h:88
OD::SI64
@ SI64
Definition: commontypes.h:49
BinID
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
StepInterval
Interval with step.
Definition: commontypes.h:32
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
IdxPair
A pair of numbers; base class for BinID et al.
Definition: idxpair.h:30
Pos::TraceID
Index_Type TraceID
Definition: commontypes.h:86
OD::Geom2D
@ Geom2D
Definition: commontypes.h:46
CaseSensitive
@ CaseSensitive
Definition: commontypes.h:40
OD::UI8
@ UI8
Definition: commontypes.h:49
od_int16
#define od_int16
Definition: plftypes.h:26
mDefDataRepTypeGetFn
#define mDefDataRepTypeGetFn(ctyp, drtyp)
Definition: commontypes.h:52
FixedString
OD::String that holds an existing text string.
Definition: fixedstring.h:29
Index_Type
od_int32 Index_Type
Definition: commontypes.h:32
od_uint16
#define od_uint16
Definition: plftypes.h:27
OD::SI8
@ SI8
Definition: commontypes.h:49
MultiID
Compound key consisting of ints.
Definition: multiid.h:24
OD::F32
@ F32
Definition: commontypes.h:49
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
TrcKey
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
OD::DataRepType
DataRepType
Definition: commontypes.h:49
od_int32
#define od_int32
Definition: plftypes.h:30
OD::String
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
OD::UI32
@ UI32
Definition: commontypes.h:49
Only3D
@ Only3D
Definition: commontypes.h:41
OD::Geom3D
@ Geom3D
Definition: commontypes.h:46
Both2DAnd3D
@ Both2DAnd3D
Definition: commontypes.h:41
OD::UI16
@ UI16
Definition: commontypes.h:49
Pos::IdxPair
IdxPair with position indices; base class for BinID et al.
Definition: posidxpair.h:29
Pos::Ordinate_Type
double Ordinate_Type
Definition: commontypes.h:90
Only2D
@ Only2D
Definition: commontypes.h:41
Pol2D3D
Pol2D3D
Definition: commontypes.h:41
OD::AutoDataRep
@ AutoDataRep
Definition: commontypes.h:49
od_uint32
#define od_uint32
Definition: plftypes.h:31
Interval
Interval of values.
Definition: commontypes.h:30
CaseSensitivity
CaseSensitivity
Definition: commontypes.h:40
Color
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
PortNr_Type
unsigned short PortNr_Type
Definition: commontypes.h:37
OD::GeomSynth
@ GeomSynth
Definition: commontypes.h:46
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
Pos::GeomID
Index_Type GeomID
Definition: commontypes.h:87
OD::GeomSystem
GeomSystem
Definition: commontypes.h:46
TypeSet
Sets of (small) copyable elements.
Definition: commontypes.h:29
DirtyCountType
od_int64 DirtyCountType
Definition: commontypes.h:36

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