Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00028
00029
00030 #ifndef GENICAM_TYPES_H
00031 #define GENICAM_TYPES_H
00032
00033 #include <Base/GCNamespace.h>
00034
00035
00036 #if defined (_WIN32) && !defined(WIN32)
00037 # define WIN32
00038 #endif
00039
00040 #if !defined (_WIN32)
00041
00042 # ifndef __STDC_LIMIT_MACROS
00043 # define __STDC_LIMIT_MACROS
00044 # endif
00045
00046 # ifndef __STDC_CONSTANT_MACROS
00047 # define __STDC_CONSTANT_MACROS
00048 # endif
00049
00050 # include <stddef.h>
00051 #ifndef VXWORKS
00052 # include <inttypes.h>
00053 #endif
00054 # include <stdint.h>
00055
00056 #elif defined (_WIN32)
00057
00060
00061
00062 # if !defined(GC_W64)
00063 # if defined(_M_IX86) && _MSC_VER >= 1300
00064 # define GC_W64 __w64
00065 # else
00066 # define GC_W64
00067 # endif
00068 # endif
00069
00070 # if defined(_MSC_VER) && _MSC_VER >= 1600
00071
00072 # include <stdint.h>
00073 # else
00074 # ifndef _STDINT // only define if not already done
00075
00077 typedef char int8_t;
00079 typedef unsigned char uint8_t;
00080
00082 typedef short int16_t;
00084 typedef unsigned short uint16_t;
00085
00087 typedef __int32 int32_t;
00089 typedef unsigned __int32 uint32_t;
00090
00092 typedef __int64 int64_t;
00094 typedef unsigned __int64 uint64_t;
00095
00096 # endif // _STDINT
00097 # endif // _MSC_VER >= 1600
00098
00099
00100
00101
00102
00103
00104
00106 typedef __int64 int_t;
00108 typedef unsigned __int64 uint_t;
00109
00110 # ifndef _SIZE_T_DEFINED
00111 # ifdef _WIN64
00112
00113 typedef unsigned __int64 size_t;
00114 # else
00115
00116 typedef GC_W64 unsigned int size_t;
00117 # endif
00118 # define _SIZE_T_DEFINED
00119 # endif
00120
00121 # ifndef _INTPTR_T_DEFINED
00122 # ifdef _WIN64
00123
00124 typedef __int64 intptr_t;
00125 # else
00126
00127 typedef GC_W64 int intptr_t;
00128 # endif
00129 # define _INTPTR_T_DEFINED
00130 # endif
00131
00132 # ifndef _UINTPTR_T_DEFINED
00133 # ifdef _WIN64
00134
00135 typedef unsigned __int64 uintptr_t;
00136 # else
00137
00138 typedef GC_W64 unsigned int uintptr_t;
00139 # endif
00140 # define _UINTPTR_T_DEFINED
00141 # endif
00142
00143 #else
00144 # error No platform-specific type definitions
00145 #endif
00146
00147
00148
00149
00150 #ifndef GC_INT64_MAX
00151 #ifdef INT64_MAX
00152 # define GC_INT64_MAX INT64_MAX
00153 #else
00154 # define GC_INT64_MAX static_cast<int64_t>(0x7fffffffffffffffLL)
00155 #endif
00156 #endif // GC_INT64_MAX
00157
00158 #ifndef GC_INT64_MIN
00159 #ifdef INT64_MIN
00160 # define GC_INT64_MIN INT64_MIN
00161 #else
00162 # define GC_INT64_MIN static_cast<int64_t>(0x8000000000000000LL)
00163 #endif
00164 #endif // GC_INT64_MIN
00165
00166 #ifndef GC_UINT64_MAX
00167 #ifdef UINT64_MAX
00168 # define GC_UINT64_MAX UINT64_MAX
00169 #else
00170 # define GC_UINT64_MAX static_cast<uint64_t>(0xffffffffffffffffULL)
00171 #endif
00172 #endif // GC_UINT64_MAX
00173
00174 #ifndef GC_INT32_MAX
00175 #ifdef INT32_MAX
00176 # define GC_INT32_MAX INT32_MAX
00177 #else
00178 # define GC_INT32_MAX static_cast<int64_t>(0x000000007fffffffLL)
00179 #endif
00180 #endif // GC_INT32_MAX
00181
00182 #ifndef GC_INT32_MIN
00183 #ifdef INT32_MIN
00184 # define GC_INT32_MIN INT32_MIN
00185 #else
00186 # define GC_INT32_MIN static_cast<int64_t>(0xffffffff80000000LL)
00187 #endif
00188 #endif // GC_INT32_MIN
00189
00190 #ifndef GC_UINT32_MAX
00191 #ifdef UINT32_MAX
00192 # define GC_UINT32_MAX UINT32_MAX
00193 #else
00194 # define GC_UINT32_MAX static_cast<uint64_t>(0x00000000ffffffffULL)
00195 #endif
00196 #endif // GC_UINT32_MAX
00197
00198 #ifndef GC_INT8_MAX
00199 #ifdef INT8_MAX
00200 # define GC_INT8_MAX INT8_MAX
00201 #else
00202 # define GC_INT8_MAX static_cast<int64_t>(0x000000000000007fLL)
00203 #endif
00204 #endif // GC_INT8_MAX
00205
00206 #ifndef GC_INT8_MIN
00207 #ifdef INT8_MIN
00208 # define GC_INT8_MIN INT8_MIN
00209 #else
00210 # define GC_INT8_MIN static_cast<int64_t>(0xffffffffffffff80LL)
00211 #endif
00212 #endif // GC_INT8_MIN
00213
00214 #ifndef GC_UINT8_MAX
00215 #ifdef UINT8_MAX
00216 # define GC_UINT8_MAX UINT8_MAX
00217 #else
00218 # define GC_UINT8_MAX static_cast<uint64_t>(0x00000000000000ffULL)
00219 #endif
00220 #endif // GC_UINT8_MAX
00221
00224
00225
00226
00227
00228
00229
00230
00231
00232
00234 typedef float float32_t;
00235
00237 typedef double float64_t;
00238
00240
00241
00242 #if defined(_MSC_VER)
00243 # ifdef GCBASE_EXPORTS
00244 # define GCBASE_API __declspec( dllexport )
00245 # define GCBASE_RTTI_CLASS_API __declspec( dllexport )
00246 # else
00247 # define GCBASE_API __declspec( dllimport )
00248 # define GCBASE_RTTI_CLASS_API __declspec( dllimport )
00249 # endif
00250 #elif defined (__GNUC__)
00251 # ifdef GCBASE_EXPORTS
00252 # define GCBASE_API __attribute__((visibility("default")))
00253 # define GCBASE_RTTI_CLASS_API __attribute__((visibility("default")))
00254 # else
00255 # define GCBASE_API
00256
00257
00258 # define GCBASE_RTTI_CLASS_API __attribute__((visibility("default")))
00259 # endif
00260 #else
00261 # error Unsupported compiler or platform
00262 #endif
00263
00264 namespace GENICAM_NAMESPACE
00265 {
00267 struct GCBASE_API Version_t
00268 {
00269 uint16_t Major;
00270 uint16_t Minor;
00271 uint16_t SubMinor;
00272 };
00273 }
00274
00275 using GENICAM_NAMESPACE::Version_t;
00276
00277
00278 #if defined(_MSC_VER)
00279 # define GC_UNUSED(unused_var) (void)(unused_var)
00280 #elif defined(__GNUC__)
00281 # define GC_UNUSED(unused_var) // no changes to unused params with GCC
00282 #else
00283 # error Unsupported compiler or platform
00284 #endif
00285
00286
00287 #endif // GENICAM_TYPES_H