ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkIntTypes.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkIntTypes_h
19 #define itkIntTypes_h
20 
21 #include "itkMacro.h"
22 
23 #if defined( ITK_HAVE_STDINT_H )
24 #include <stdint.h>
25 #else
26 // the system doesn't have the C or C++ version of stdint so lets use
27 // KWIML's macros for fixed widths
28 #include "itk_kwiml.h"
29 
30 #ifdef ITK_HAVE_STDDEF_H
31 #include <cstddef>
32 #endif //ITK_HAVE_STDDEF_H
33 
34 #endif // ITK_HAVE_CSTDINT
35 
36 #include <climits>
37 
38 namespace itk
39 {
40 #if defined( ITK_HAVE_STDINT_H )
41 
42 // Note: these types are technically optional in C99 stdint.h file. As
43 // such a try complile for their existence may be needed.
52 
53 // Note: these types are required for the C99 stdint.h file.
62 
63 // Note: these types are required for the C99 stdint.h file.
72 
75 
78 
79 #else // ITK_HAVE_STDINT_H
80 
82 typedef KWIML_INT_int8_t int8_t;
83 typedef KWIML_INT_uint8_t uint8_t;
84 typedef KWIML_INT_int16_t int16_t;
85 typedef KWIML_INT_uint16_t uint16_t;
86 typedef KWIML_INT_int32_t int32_t;
87 typedef KWIML_INT_uint32_t uint32_t;
88 typedef KWIML_INT_int64_t int64_t;
89 typedef KWIML_INT_uint64_t uint64_t;
90 
101 
112 
116 
117 typedef::ptrdiff_t intptr_t;
118 typedef::size_t uintptr_t;
119 
120 #endif // ITK_HAVE_STDINT_H
121 
122 #if !defined(ITKV3_COMPATIBILITY) && defined(ITK_USE_64BITS_IDS) && ((ULLONG_MAX != ULONG_MAX) || (LLONG_MAX != LONG_MAX))
123 
126 typedef uint64_t SizeValueType;
127 
131 
133 typedef int64_t IndexValueType;
134 
137 typedef int64_t OffsetValueType;
138 
139 #else
140 
143 typedef unsigned long SizeValueType;
144 
148 
150 typedef signed long IndexValueType;
151 
154 typedef signed long OffsetValueType;
155 
156 #endif
157 
159 typedef unsigned int ThreadIdType;
160 
164 typedef unsigned long ModifiedTimeType;
165 
166 }
167 
168 #endif /* itkIntTypes_h */
int64_t int_fast64_t
Definition: itkIntTypes.h:110
uint64_t uint_fast64_t
Definition: itkIntTypes.h:111
KWIML_INT_uint8_t uint8_t
Definition: itkIntTypes.h:83
int64_t intmax_t
Definition: itkIntTypes.h:114
int8_t int_fast8_t
Definition: itkIntTypes.h:104
signed long OffsetValueType
Definition: itkIntTypes.h:154
signed long IndexValueType
Definition: itkIntTypes.h:150
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
int16_t int_fast16_t
Definition: itkIntTypes.h:106
KWIML_INT_uint32_t uint32_t
Definition: itkIntTypes.h:87
uint64_t uint_least64_t
Definition: itkIntTypes.h:100
KWIML_INT_int64_t int64_t
Definition: itkIntTypes.h:88
unsigned long SizeValueType
Definition: itkIntTypes.h:143
KWIML_INT_uint16_t uint16_t
Definition: itkIntTypes.h:85
int8_t int_least8_t
Definition: itkIntTypes.h:93
uint16_t uint_least16_t
Definition: itkIntTypes.h:96
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
uint8_t uint_fast8_t
Definition: itkIntTypes.h:105
KWIML_INT_int16_t int16_t
Definition: itkIntTypes.h:84
uint32_t uint_least32_t
Definition: itkIntTypes.h:98
int64_t int_least64_t
Definition: itkIntTypes.h:99
int32_t int_fast32_t
Definition: itkIntTypes.h:108
uint8_t uint_least8_t
Definition: itkIntTypes.h:94
int32_t int_least32_t
Definition: itkIntTypes.h:97
KWIML_INT_uint64_t uint64_t
Definition: itkIntTypes.h:89
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
uint64_t uintmax_t
Definition: itkIntTypes.h:115
uint16_t uint_fast16_t
Definition: itkIntTypes.h:107
KWIML_INT_int8_t int8_t
Definition: itkIntTypes.h:82
typedef::vcl_size_t uintptr_t
Definition: itkIntTypes.h:118
int16_t int_least16_t
Definition: itkIntTypes.h:95
KWIML_INT_int32_t int32_t
Definition: itkIntTypes.h:86
uint32_t uint_fast32_t
Definition: itkIntTypes.h:109
typedef::ptrdiff_t intptr_t
Definition: itkIntTypes.h:117