OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include <complex>
15 #include "convert.h"
16 
17 typedef std::complex<float> float_complex;
18 typedef std::complex<double> double_complex;
19 
20 namespace Values
21 {
22 
27 template<>
29 {
30 public:
31 
32  static bool hasUdf() { return true; }
33  static float_complex val()
34  {
37  }
38  static bool isUdf( float_complex f )
39  {
40  const float r = f.real();
41  const float i = f.imag();
42  return __mIsUndefinedF(r)
43  || __mIsUndefinedF(i);
44  }
45  static void setUdf( float_complex& f )
46  {
49  }
50 
51 };
52 
53 
54 };//namespace Values
55 
56 
58 mGlobal(Basic) const char* toString(float_complex);
59 
61 
62 
toString
const char * toString(float_complex)
Values::Undef< float_complex >::hasUdf
static bool hasUdf()
Definition: odcomplex.h:32
Values::Undef< float_complex >::val
static float_complex val()
Definition: odcomplex.h:33
float_complex
std::complex< float > float_complex
Definition: odcomplex.h:17
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
double_complex
std::complex< double > double_complex
Definition: odcomplex.h:18
__mIsUndefinedF
#define __mIsUndefinedF(x)
Definition: undefval.h:22
mClass
#define mClass(module)
Definition: commondefs.h:181
__mUndefFValue
#define __mUndefFValue
Definition: undefval.h:19
convert.h
Values::Undef< float_complex >::isUdf
static bool isUdf(float_complex f)
Definition: odcomplex.h:38
Conv
Template based type conversion.
Definition: convert.h:23
isUdfImpl
bool isUdfImpl(float_complex)
Values
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:113
Values::Undef< float_complex >
Undefined float_complex.
Definition: odcomplex.h:29
mConvDeclFromStrToSimpleType
#define mConvDeclFromStrToSimpleType(type)
Definition: convert.h:188
Values::Undef< float_complex >::setUdf
static void setUdf(float_complex &f)
Definition: odcomplex.h:45

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