00001 /* 00002 * Copyright (C) 2006-2011, SRI International (R) 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU Lesser General Public License as published by 00006 * the Free Software Foundation, either version 3 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #pragma once 00019 00020 #ifndef __OpenKarto_Types_h__ 00021 #define __OpenKarto_Types_h__ 00022 00023 #include <assert.h> 00024 00025 #include <cstddef> 00026 00031 00032 #if defined(_MSC_VER) 00033 00037 typedef signed __int8 kt_int8s; 00038 00042 typedef unsigned __int8 kt_int8u; 00043 00047 typedef signed __int16 kt_int16s; 00048 00052 typedef unsigned __int16 kt_int16u; 00053 00057 typedef signed __int32 kt_int32s; 00058 00062 typedef unsigned __int32 kt_int32u; 00063 00067 typedef signed __int64 kt_int64s; 00068 00072 typedef unsigned __int64 kt_int64u; 00073 00077 typedef std::size_t kt_size_t; 00078 00079 #else 00080 00081 #include <stdint.h> 00082 00086 typedef int8_t kt_int8s; 00087 00091 typedef uint8_t kt_int8u; 00092 00096 typedef int16_t kt_int16s; 00097 00101 typedef uint16_t kt_int16u; 00102 00106 typedef int32_t kt_int32s; 00107 00111 typedef uint32_t kt_int32u; 00112 00113 #if defined(__LP64__) 00114 00117 typedef signed long kt_int64s; 00118 00122 typedef unsigned long kt_int64u; 00123 #else 00124 00127 typedef signed long long kt_int64s; 00128 00132 typedef unsigned long long kt_int64u; 00133 #endif 00134 00138 typedef std::size_t kt_size_t; 00139 00140 #endif 00141 00145 typedef bool kt_bool; 00146 00150 typedef char kt_char; 00151 00155 typedef float kt_float; 00156 00160 typedef double kt_double; 00161 00165 typedef kt_int32u kt_objecttype; 00166 00170 typedef kt_int64s kt_tick; 00171 00174 #endif // __OpenKarto_Types_h__