Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtlTypes.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Open IGT Link Library
4  Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlTypes.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 __igtlTypes_H
18 #define __igtlTypes_H
19 
20 #include "igtlTypeConfig.h"
21 
22 /* 8-bit integer type */
23 #if IGTL_SIZEOF_CHAR == 1
24  typedef unsigned char igtlUint8;
25  typedef char igtlInt8;
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 igtlUint16;
33  typedef signed short igtlInt16;
34 #elif IGTL_SIZEOF_INT == 2
35  typedef unsigned int igtlUint16;
36  typedef signed int igtlInt16;
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 igtlUint32;
44  typedef signed int igtlInt32;
45 #elif IGTL_SIZEOF_LONG == 4
46  typedef unsigned long igtlUint32;
47  typedef signed long igtlInt32;
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 igtlUint64;
55  typedef signed long long igtlInt64;
56 #elif IGTL_SIZEOF_INT == 8
57  typedef unsigned int igtlUint64;
58  typedef signed int igtlInt64;
59 #elif IGTL_SIZEOF_LONG == 8
60  typedef unsigned long igtlUint64;
61  typedef signed long igtlInt64;
62 #elif defined(IGTL_TYPE_USE___INT64) && IGTL_SIZEOF___INT64 == 8
63  typedef unsigned __int64 igtlUint64;
64  typedef signed __int64 igtlInt64;
65 #elif defined(IGTL_TYPE_USE_INT64_T) && IGTL_SIZEOF_INT64_T == 8
66  typedef unsigned int64_t igtlUint64;
67  typedef signed int64_t igtlInt64;
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 igtlFloat32;
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 igtlFloat64;
82 #else
83 # error "No native data type can represent a 64-bit floating point value."
84 #endif
85 
86 /* 128-bit complex type */
87 typedef double igtlComplex[2];
88 
89 
90 #endif /* __igtlTypes_H */
91 

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