OpendTect-6_4  6.4
odcomplex.h
Go to the documentation of this file.
1 #ifndef odcomplex_h
2 #define odcomplex_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: January 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include <complex>
16 #include "convert.h"
17 
18 typedef std::complex<float> float_complex;
19 typedef std::complex<double> double_complex;
20 
21 namespace Values
22 {
23 
28 template<>
30 {
31 public:
32 
33  static bool hasUdf() { return true; }
34  static float_complex val()
35  {
38  }
39  static bool isUdf( float_complex f )
40  {
41  const float r = f.real();
42  const float i = f.imag();
43  return __mIsUndefinedF(r)
44  || __mIsUndefinedF(i);
45  }
46  static void setUdf( float_complex& f )
47  {
50  }
51 
52 };
53 
54 
55 };//namespace Values
56 
57 
58 mGlobal(Basic) bool isUdfImpl(float_complex);
59 mGlobal(Basic) const char* toString(float_complex);
60 
62 
63 
64 #endif
static void setUdf(float_complex &f)
Definition: odcomplex.h:46
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:106
bool isUdfImpl(float_complex)
static bool hasUdf()
Definition: odcomplex.h:33
#define mGlobal(module)
Definition: commondefs.h:163
#define __mIsUndefinedF(x)
Definition: undefval.h:23
const char * toString(float_complex)
std::complex< float > float_complex
Definition: odcomplex.h:18
static float_complex val()
Definition: odcomplex.h:34
#define mConvDeclFromStrToSimpleType(type)
Definition: convert.h:183
std::complex< double > double_complex
Definition: odcomplex.h:19
#define __mUndefFValue
Definition: undefval.h:20
Template based type conversion.
Definition: convert.h:24
#define mClass(module)
Definition: commondefs.h:164
Templatized undefined values.
Definition: undefval.h:51
static bool isUdf(float_complex f)
Definition: odcomplex.h:39

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