ionTypes.h
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include <ionConfig.h>
12 
13 #include <string>
14 #include <vector>
15 #include <list>
16 #include <set>
17 #include <map>
18 #include <unordered_map>
19 #include <deque>
20 #include <utility>
21 #include <initializer_list>
22 
23 #include <climits>
24 #include <limits>
25 
26 
27 namespace ion
28 {
29 
30  // STL imports
31  using std::string;
32  using std::vector;
33  using std::list;
34  using std::set;
35  using std::map;
36  using std::unordered_map;
37  using std::deque;
38  using std::pair;
39 
40  // Standard types
41  typedef unsigned short ushort;
42  typedef unsigned int uint;
43  typedef unsigned long ulong;
44  typedef unsigned long long ulonglong;
45  typedef unsigned char byte;
46 
47 
48  // 8 bits integer types
49 #if UCHAR_MAX == 0xFF
50  typedef signed char Int8;
51  typedef unsigned char Uint8;
52 #else
53 #error No 8 bits integer type for this platform
54 #endif
55 
56 // 16 bits integer types
57 #if USHRT_MAX == 0xFFFF
58  typedef signed short Int16;
59  typedef unsigned short Uint16;
60 #elif UINT_MAX == 0xFFFF
61  typedef signed int Int16;
62  typedef unsigned int Uint16;
63 #elif ULONG_MAX == 0xFFFF
64  typedef signed long Int16;
65  typedef unsigned long Uint16;
66 #else
67 #error No 16 bits integer type for this platform
68 #endif
69 
70 // 32 bits integer types
71 #if USHRT_MAX == 0xFFFFFFFF
72  typedef signed short Int32;
73  typedef unsigned short Uint32;
74 #elif UINT_MAX == 0xFFFFFFFF
75  typedef signed int Int32;
76  typedef unsigned int Uint32;
77 #elif ULONG_MAX == 0xFFFFFFFF
78  typedef signed long Int32;
79  typedef unsigned long Uint32;
80 #else
81 #error No 32 bits integer type for this platform
82 #endif
83 
84 // 64 bits integer types
85 #if USHRT_MAX == 0xFFFFFFFFFFFFFFFF
86  typedef signed short Int64;
87  typedef unsigned short Uint64;
88 #define _ION_64BIT_INTEGERS_DEFINED
89 #elif UINT_MAX == 0xFFFFFFFFFFFFFFFF
90  typedef signed int Int64;
91  typedef unsigned int Uint64;
92 #define _ION_64BIT_INTEGERS_DEFINED
93 #elif ULONG_MAX == 0xFFFFFFFFFFFFFFFF
94  typedef signed long Int64;
95  typedef unsigned long Uint64;
96 #define _ION_64BIT_INTEGERS_DEFINED
97 #elif ULLONG_MAX == 0xFFFFFFFFFFFFFFFF
98  typedef signed long long Int64;
99  typedef unsigned long long Uint64;
100 #define _ION_64BIT_INTEGERS_DEFINED
101 #endif
102 
103 }
unsigned char byte
Definition: ionTypes.h:45
unsigned long ulong
Definition: ionTypes.h:43
unsigned short ushort
Definition: ionTypes.h:41
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
unsigned int uint
Definition: ionTypes.h:42
unsigned long long ulonglong
Definition: ionTypes.h:44
set(ION_ENGINE_VERSION 0.4.5) cmake_minimum_required(VERSION 3.2 FATAL_ERROR) project(ionEngine VERSION $
Definition: CMakeLists.txt:2