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.
00001 /*=========================================================================
00002 
00003   Program:   Open IGT Link Library
00004   Module:    $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlutil/igtl_types.h $
00005   Language:  C
00006   Date:      $Date: 2008-12-22 19:05:42 -0500 (Mon, 22 Dec 2008) $
00007   Version:   $Revision: 3460 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010 
00011   This software is distributed WITHOUT ANY WARRANTY; without even
00012   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013   PURPOSE.  See the above copyright notices for more information.
00014 
00015 =========================================================================*/
00016 
00017 #ifndef __IGTL_TYPES_H
00018 #define __IGTL_TYPES_H
00019 
00020 #include "igtl_typeconfig.h"
00021 
00022 /* 8-bit integer type */
00023 #if IGTL_SIZEOF_CHAR == 1
00024   typedef unsigned char igtl_uint8;
00025   typedef char          igtl_int8;
00026 #else
00027   # error "No native data type can represent an 8-bit integer."
00028 #endif
00029 
00030 /* 16-bit integer type */
00031 #if IGTL_SIZEOF_SHORT == 2
00032   typedef unsigned short igtl_uint16;
00033   typedef signed short   igtl_int16;
00034 #elif IGTL_SIZEOF_INT == 2
00035   typedef unsigned int   igtl_uint16;
00036   typedef signed int     igtl_int16;
00037 #else
00038   # error "No native data type can represent a 16-bit integer."
00039 #endif
00040 
00041 /* 32-bit integer type */
00042 #if IGTL_SIZEOF_INT == 4
00043   typedef unsigned int   igtl_uint32;
00044   typedef signed int     igtl_int32;
00045 #elif IGTL_SIZEOF_LONG == 4
00046   typedef unsigned long  igtl_uint32;
00047   typedef signed long    igtl_int32;
00048 #else
00049   # error "No native data type can represent a 32-bit integer."
00050 #endif
00051 
00052 /* 64-bit integer type */
00053 #if defined(IGTL_TYPE_USE_LONG_LONG) && IGTL_SIZEOF_LONG_LONG == 8
00054   typedef unsigned long long igtl_uint64;
00055   typedef signed long long   igtl_int64;
00056 #elif IGTL_SIZEOF_INT == 8
00057   typedef unsigned int       igtl_uint64;
00058   typedef signed int         igtl_int64;
00059 #elif IGTL_SIZEOF_LONG == 8
00060   typedef unsigned long      igtl_uint64;
00061   typedef signed long        igtl_int64;
00062 #elif defined(IGTL_TYPE_USE___INT64) && IGTL_SIZEOF___INT64 == 8
00063   typedef unsigned __int64   igtl_uint64;
00064   typedef signed __int64     igtl_int64;
00065 #elif defined(IGTL_TYPE_USE_INT64_T) && IGTL_SIZEOF_INT64_T == 8
00066   typedef unsigned int64_t   igtl_uint64;
00067   typedef signed int64_t     igtl_int64;
00068 #else
00069   # error "No native data type can represent a 64-bit integer."
00070 #endif
00071 
00072 /* 32-bit floating point type */
00073 #if IGTL_SIZEOF_FLOAT == 4
00074   typedef float              igtl_float32;
00075 #else
00076 # error "No native data type can represent a 32-bit floating point value."
00077 #endif
00078 
00079 /* 64-bit floating point type */
00080 #if IGTL_SIZEOF_DOUBLE == 8
00081   typedef double             igtl_float64;
00082 #else
00083 # error "No native data type can represent a 64-bit floating point value."
00084 #endif
00085 
00086 
00087 #endif /* __IGTL_TYPES_H */
00088 

Generated at Sat May 9 04:47:22 2009 for OpenIGTLink by doxygen 1.5.9 written by Dimitri van Heesch, © 1997-2000