OpendTect  6.3
odcomplex.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: Nanne Hemstra
8  Date: January 2010
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include <complex>
14 #include "convert.h"
15 
16 typedef std::complex<float> float_complex;
17 typedef std::complex<double> double_complex;
18 
19 namespace Values
20 {
21 
26 template<>
28 {
29 public:
30 
31  static bool hasUdf() { return true; }
32  static float_complex val()
33  {
36  }
37  static bool isUdf( float_complex f )
38  {
39  const float r = f.real();
40  const float i = f.imag();
41  return __mIsUndefinedF(r)
42  || __mIsUndefinedF(i);
43  }
44  static void setUdf( float_complex& f )
45  {
48  }
49 
50 };
51 
52 
53 };//namespace Values
54 
55 
56 mGlobal(Basic) bool isUdfImpl(float_complex);
57 mGlobal(Basic) const char* toString(float_complex);
58 
static void setUdf(float_complex &f)
Definition: odcomplex.h:44
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:113
bool isUdfImpl(float_complex)
static bool hasUdf()
Definition: odcomplex.h:31
#define mGlobal(module)
Definition: commondefs.h:160
#define __mIsUndefinedF(x)
Definition: undefval.h:21
const char * toString(float_complex)
std::complex< float > float_complex
Definition: odcomplex.h:16
static float_complex val()
Definition: odcomplex.h:32
#define mConvDeclFromStrToSimpleType(type)
Definition: convert.h:181
std::complex< double > double_complex
Definition: odcomplex.h:17
#define __mUndefFValue
Definition: undefval.h:18
Template based type conversion.
Definition: convert.h:22
#define mClass(module)
Definition: commondefs.h:161
Templatized undefined values.
Definition: undefval.h:49
static bool isUdf(float_complex f)
Definition: odcomplex.h:37

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