00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024
00025
00026 #ifndef __FLGR_CORE_TYPES_H
00027 #define __FLGR_CORE_TYPES_H
00028
00029 #include <flgrCoreDll.h>
00030
00039 typedef enum {
00041 FLGR_RET_OK = 0,
00043 FLGR_RET_TYPE_UNKNOWN = -1,
00045 FLGR_RET_TYPE_DIFFERENT = -2,
00047 FLGR_RET_SIZE_ERROR = -3,
00049 FLGR_RET_ALLOCATION_ERROR = -4,
00051 FLGR_RET_CONNEXITY_UNKNOWN = -5,
00053 FLGR_RET_PARAM_UNKNOWN = -6,
00055 FLGR_RET_NOT_IMPLEMENTED = -7,
00057 FLGR_RET_UNDEFINED_ERROR = -8,
00058
00059 FLGR_RET_NULL_OBJECT = -9,
00060
00061 FLGR_RET_VECTOR_SIZE_DIFFERENT = -10,
00062
00063 FLGR_RET_VECTOR_SIZE_ERROR = -11,
00064
00065 FLGR_RET_PARAM_ERROR = -12,
00066
00067 }FLGR_Ret;
00068
00072 typedef enum {
00073 FLGR_LINE,
00074 FLGR_RECT,
00075 FLGR_HEX,
00076 FLGR_DISC,
00077 FLGR_ELLIPSE,
00078 FLGR_CROSS,
00079 FLGR_CROSSX,
00080 FLGR_SLASH,
00081 FLGR_BSLASH,
00082 FLGR_DIAMOND,
00083 FLGR_OCTAGON,
00084 FLGR_USER_SHAPE,
00085 FLGR_NO_SHAPE,
00086 }FLGR_Shape;
00087
00091 typedef enum {
00092 FLGR_4_CONNEX = 4,
00093 FLGR_6_CONNEX = 6,
00094 FLGR_8_CONNEX = 8,
00095 FLGR_NO_CONNEX = 0
00096 }FLGR_Connexity;
00097
00101 typedef enum {
00102 FLGR_BIT,
00103 FLGR_UINT8,
00104 FLGR_UINT16,
00105 FLGR_UINT32,
00106 FLGR_UINT64,
00107 FLGR_INT8,
00108 FLGR_INT16,
00109 FLGR_INT32,
00110 FLGR_INT64,
00111 FLGR_FLOAT32,
00112 FLGR_FLOAT64
00113 }FLGR_Type;
00114
00115
00116 typedef enum {
00117 FLGR_TEST_INF = 0,
00118 FLGR_TEST_INFEQ = 1,
00119 FLGR_TEST_EQ = 2,
00120 FLGR_TEST_SUPEQ = 3,
00121 FLGR_TEST_SUP = 4,
00122 FLGR_TEST_DIFF = 5,
00123 FLGR_TEST_UNKNOWN = 6
00124 }FLGR_Test;
00125
00129 typedef enum {
00131 FLGR_NHB_SYM = 0,
00133 FLGR_NHB_NO_SYM = 1,
00134 }FLGR_Sym;
00135
00136
00137
00141 typedef enum {
00142 FLGR_MORPHO_OPTIM_SQUARE,
00143 FLGR_MORPHO_OPTIM_CROSS,
00144 FLGR_MORPHO_OPTIM_HEXAGON,
00145 FLGR_MORPHO_OPTIM_RECTANGLE,
00146 FLGR_MORPHO_OPTIM_OCTAGON,
00147 FLGR_MORPHO_OPTIM_DIAMOND,
00148 FLGR_MORPHO_OPTIM_NONE
00149 }FLGR_MorphoOptim;
00150
00151
00152
00153
00154
00155
00156 #if defined(_MSC_VER)
00157 typedef unsigned __int64 fgUINT64
00158 typedef __int64 fgINT64
00159 #else
00160 typedef unsigned long long fgUINT64;
00161 typedef long long fgINT64;
00162 #endif
00163
00164
00165 typedef unsigned char fgUINT8;
00166 typedef unsigned short int fgUINT16;
00167 typedef unsigned int fgUINT32;
00168 typedef char fgINT8;
00169 typedef short int fgINT16;
00170 typedef int fgINT32;
00171 typedef float fgFLOAT32;
00172 typedef double fgFLOAT64;
00173
00174
00175 #if defined(x86_64)
00176 typedef fgUINT64 fgBIT;
00177 #else
00178 typedef fgUINT32 fgBIT;
00179 #endif
00180
00181
00182 typedef fgUINT8 fgBOOL;
00183
00184 #define FLGR_PVOID_VAL(dtype,val) (*((dtype *) (val)))
00185 #define FLGR_PVOID_PTR(dtype,val) ((dtype*) (val))
00186
00187 #define FLGR_TRUE 1
00188 #define FLGR_FALSE 0
00189
00190 #define MAX_fgBIT (1)
00191 #define MIN_fgBIT (0)
00192
00193 #define MAX_fgUINT8 (255)
00194 #define MIN_fgUINT8 (0)
00195
00196 #define MAX_fgUINT16 (65535)
00197 #define MIN_fgUINT16 0
00198
00199 #define MAX_fgUINT32 (4294967295U)
00200 #define MIN_fgUINT32 (0)
00201
00202 #define MAX_fgUINT64 (18446744073709551615ULL)
00203 #define MIN_fgUINT64 (0)
00204
00205 #define MAX_fgINT8 (127)
00206 #define MIN_fgINT8 (-128)
00207
00208 #define MAX_fgINT16 (32767)
00209 #define MIN_fgINT16 (-32767-1)
00210
00211 #define MAX_fgINT32 (2147483647)
00212 #define MIN_fgINT32 (-2147483647-1)
00213
00214 #define MAX_fgINT64 (9223372036854775807LL)
00215 #define MIN_fgINT64 (-(9223372036854775807LL)-1)
00216
00217 #define MAX_fgFLOAT32 3.4e37
00218 #define MIN_fgFLOAT32 -3.4e-37
00219
00220 #define MAX_fgFLOAT64 1.7e307
00221 #define MIN_fgFLOAT64 -1.7e-307
00222
00223 #define FLGR_PI ((double) 3.141592653589793238462643383279502884195)
00224
00225 #define FLGR_MIN(a,b) ( (a) < (b) ? (a) : (b) )
00226 #define FLGR_MAX(a,b) ( (a) < (b) ? (b) : (a) )
00227
00228 EXPORT_LIB FLGR_Ret flgr_is_vector_type_valid(FLGR_Type type);
00229 EXPORT_LIB int flgr_get_bps_from_type(FLGR_Type type);
00230 EXPORT_LIB int flgr_get_sizeof(FLGR_Type type);
00231 EXPORT_LIB FLGR_Ret flgr_is_data_type_valid(FLGR_Type type);
00232 EXPORT_LIB char *flgr_get_type_string(FLGR_Type type);
00233 EXPORT_LIB char *flgr_get_shape_string(FLGR_Shape shape);
00234 EXPORT_LIB FLGR_Type flgr_get_type_from_string(char *type);
00235
00236
00238
00239
00240 #endif
00241
00242 #ifdef __cplusplus
00243 }
00244 #endif
00245