0068472c040b3b4a4b3e682af2ca9436f3957bfe
[ipdf/code.git] / src / real.h
1 #ifndef _REAL_H
2 #define _REAL_H
3
4 #include "common.h"
5
6 #define REAL_SINGLE 0
7 #define REAL_DOUBLE 1
8 #define REAL_LONG_DOUBLE 2
9
10 #ifndef REAL
11         #error "REAL was not defined!"
12 #endif
13
14 namespace IPDF
15 {       
16         extern const char * g_real_name[];
17
18 #if REAL == REAL_SINGLE
19         typedef float Real;
20         inline float Float(Real r) {return r;}
21 #elif REAL == REAL_DOUBLE
22         typedef double Real;
23         inline double Float(Real r) {return r;}
24 #elif REAL == REAL_LONG_DOUBLE
25         typedef long double Real;
26         inline long double Float(Real r) {return r;}
27 #else
28         #error "Type of Real unspecified."
29 #endif //REAL
30
31 }
32
33 #endif //_REAL_H

UCC git Repository :: git.ucc.asn.au