Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_types.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: OpenIGTLink Library
4  Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlutil/igtl_types.h $
5  Language: C
6  Date: $Date: 2011-03-24 00:08:23 -0400 (Thu, 24 Mar 2011) $
7  Version: $Revision: 7354 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notices for more information.
14 
15 =========================================================================*/
16 
17 #ifndef __IGTL_TYPES_H
18 #define __IGTL_TYPES_H
19 
20 #include "igtl_typeconfig.h"
21 
22 /* 8-bit integer type */
23 #if IGTL_SIZEOF_CHAR == 1
24  typedef unsigned char igtl_uint8;
25  typedef char igtl_int8;
26 #else
27  # error "No native data type can represent an 8-bit integer."
28 #endif
29 
30 /* 16-bit integer type */
31 #if IGTL_SIZEOF_SHORT == 2
32  typedef unsigned short igtl_uint16;
33  typedef signed short igtl_int16;
34 #elif IGTL_SIZEOF_INT == 2
35  typedef unsigned int igtl_uint16;
36  typedef signed int igtl_int16;
37 #else
38  # error "No native data type can represent a 16-bit integer."
39 #endif
40 
41 /* 32-bit integer type */
42 #if IGTL_SIZEOF_INT == 4
43  typedef unsigned int igtl_uint32;
44  typedef signed int igtl_int32;
45 #elif IGTL_SIZEOF_LONG == 4
46  typedef unsigned long igtl_uint32;
47  typedef signed long igtl_int32;
48 #else
49  # error "No native data type can represent a 32-bit integer."
50 #endif
51 
52 /* 64-bit integer type */
53 #if defined(IGTL_TYPE_USE_LONG_LONG) && IGTL_SIZEOF_LONG_LONG == 8
54  typedef unsigned long long igtl_uint64;
55  typedef signed long long igtl_int64;
56 #elif IGTL_SIZEOF_INT == 8
57  typedef unsigned int igtl_uint64;
58  typedef signed int igtl_int64;
59 #elif IGTL_SIZEOF_LONG == 8
60  typedef unsigned long igtl_uint64;
61  typedef signed long igtl_int64;
62 #elif defined(IGTL_TYPE_USE___INT64) && IGTL_SIZEOF___INT64 == 8
63  typedef unsigned __int64 igtl_uint64;
64  typedef signed __int64 igtl_int64;
65 #elif defined(IGTL_TYPE_USE_INT64_T) && IGTL_SIZEOF_INT64_T == 8
66  typedef unsigned int64_t igtl_uint64;
67  typedef signed int64_t igtl_int64;
68 #else
69  # error "No native data type can represent a 64-bit integer."
70 #endif
71 
72 /* 32-bit floating point type */
73 #if IGTL_SIZEOF_FLOAT == 4
74  typedef float igtl_float32;
75 #else
76 # error "No native data type can represent a 32-bit floating point value."
77 #endif
78 
79 /* 64-bit floating point type */
80 #if IGTL_SIZEOF_DOUBLE == 8
81  typedef double igtl_float64;
82 #else
83 # error "No native data type can represent a 64-bit floating point value."
84 #endif
85 
86 /* 128-bit complex type (64-bit real + 64-bit imaginal)*/
87 typedef double igtl_complex[2];
88 
89 
90 #endif /* __IGTL_TYPES_H */
91 
92 
93 
94 
95 

Generated at Thu Mar 20 2014 16:32:06 for OpenIGTLink by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2000