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_DISPATCH_H
00027 #define __FLGR_CORE_DISPATCH_H
00028
00029 #include <flgrCoreDll.h>
00030 #include <flgrCoreTypes.h>
00031 #include <flgrCoreErrors.h>
00032 #include <flgrCoreData.h>
00033
00034
00035 #define flgr_no_define_type_function(type) POST_ERROR("data in <%s> format is not implemented!\n",flgr_get_type_string(type));
00036
00037
00038 #define FLGR_FULL_PROCEDURE_DISPATCH(typevar,function_base,...) \
00039 if(typevar == FLGR_BIT) { \
00040 POST_DEBUG("launching "#function_base"_fgBIT\n"); \
00041 function_base##_fgBIT(__VA_ARGS__); \
00042 return FLGR_RET_OK; \
00043 } \
00044 if(typevar==FLGR_UINT8) { \
00045 POST_DEBUG("launching "#function_base"_fgUINT8\n"); \
00046 function_base##_fgUINT8(__VA_ARGS__); \
00047 return FLGR_RET_OK; \
00048 } \
00049 if(typevar==FLGR_UINT16) { \
00050 POST_DEBUG("launching "#function_base"_fgUINT16\n"); \
00051 function_base##_fgUINT16(__VA_ARGS__); \
00052 return FLGR_RET_OK; \
00053 } \
00054 if(typevar==FLGR_UINT32) { \
00055 POST_DEBUG("launching "#function_base"_fgUINT32\n"); \
00056 function_base##_fgUINT32(__VA_ARGS__); \
00057 return FLGR_RET_OK; \
00058 } \
00059 if(typevar==FLGR_UINT64) { \
00060 POST_DEBUG("launching "#function_base"_fgUINT64\n"); \
00061 function_base##_fgUINT64(__VA_ARGS__); \
00062 return FLGR_RET_OK; \
00063 } \
00064 if(typevar==FLGR_INT8) { \
00065 POST_DEBUG("launching "#function_base"_fgINT8\n"); \
00066 function_base##_fgINT8(__VA_ARGS__); \
00067 return FLGR_RET_OK; \
00068 } \
00069 if(typevar==FLGR_INT16) { \
00070 POST_DEBUG("launching "#function_base"_fgINT16\n"); \
00071 function_base##_fgINT16(__VA_ARGS__); \
00072 return FLGR_RET_OK; \
00073 } \
00074 if(typevar==FLGR_INT32) { \
00075 POST_DEBUG("launching "#function_base"_fgINT32\n"); \
00076 function_base##_fgINT32(__VA_ARGS__); \
00077 return FLGR_RET_OK; \
00078 } \
00079 if(typevar==FLGR_INT64) { \
00080 POST_DEBUG("launching "#function_base"_fgINT64\n"); \
00081 function_base##_fgINT64(__VA_ARGS__); \
00082 return FLGR_RET_OK; \
00083 } \
00084 if(typevar==FLGR_FLOAT32) { \
00085 POST_DEBUG("launching "#function_base"_fgFLOAT32\n"); \
00086 function_base##_fgFLOAT32(__VA_ARGS__); \
00087 return FLGR_RET_OK; \
00088 } \
00089 if(typevar==FLGR_FLOAT64) { \
00090 POST_DEBUG("launching "#function_base"_fgFLOAT64\n"); \
00091 function_base##_fgFLOAT64(__VA_ARGS__); \
00092 return FLGR_RET_OK; \
00093 } \
00094 POST_ERROR("type <%s> unknown!\n",flgr_get_type_string(typevar)); \
00095 return FLGR_RET_TYPE_UNKNOWN
00096
00097
00098 #define FLGR_FULL_FUNCTION_DISPATCH(fail,typevar,function_base,...) \
00099 if(typevar == FLGR_BIT) { \
00100 POST_DEBUG("launching "#function_base"_fgBIT\n"); \
00101 return function_base##_fgBIT(__VA_ARGS__); \
00102 } \
00103 if(typevar==FLGR_UINT8) { \
00104 POST_DEBUG("launching "#function_base"_fgUINT8\n"); \
00105 return function_base##_fgUINT8(__VA_ARGS__); \
00106 } \
00107 if(typevar==FLGR_UINT16) { \
00108 POST_DEBUG("launching "#function_base"_fgUINT16\n"); \
00109 return function_base##_fgUINT16(__VA_ARGS__); \
00110 } \
00111 if(typevar==FLGR_UINT32) { \
00112 POST_DEBUG("launching "#function_base"_fgUINT32\n"); \
00113 return function_base##_fgUINT32(__VA_ARGS__); \
00114 } \
00115 if(typevar==FLGR_UINT64) { \
00116 POST_DEBUG("launching "#function_base"_fgUINT64\n"); \
00117 return function_base##_fgUINT64(__VA_ARGS__); \
00118 } \
00119 if(typevar==FLGR_INT8) { \
00120 POST_DEBUG("launching "#function_base"_fgINT8\n"); \
00121 return function_base##_fgINT8(__VA_ARGS__); \
00122 } \
00123 if(typevar==FLGR_INT16) { \
00124 POST_DEBUG("launching "#function_base"_fgINT16\n"); \
00125 return function_base##_fgINT16(__VA_ARGS__); \
00126 } \
00127 if(typevar==FLGR_INT32) { \
00128 POST_DEBUG("launching "#function_base"_fgINT32\n"); \
00129 return function_base##_fgINT32(__VA_ARGS__); \
00130 } \
00131 if(typevar==FLGR_INT64) { \
00132 POST_DEBUG("launching "#function_base"_fgINT64\n"); \
00133 return function_base##_fgINT64(__VA_ARGS__); \
00134 } \
00135 if(typevar==FLGR_FLOAT32) { \
00136 POST_DEBUG("launching "#function_base"_fgFLOAT32\n"); \
00137 return function_base##_fgFLOAT32(__VA_ARGS__); \
00138 } \
00139 if(typevar==FLGR_FLOAT64) { \
00140 POST_DEBUG("launching "#function_base"_fgFLOAT64\n"); \
00141 return function_base##_fgFLOAT64(__VA_ARGS__); \
00142 } \
00143 POST_ERROR("type <%s> unknown!\n",flgr_get_type_string(typevar)); \
00144 return fail
00145
00146
00147 #define FLGR_FULL_DISPATCH_CONST_FUNCTION(fail, typevar, fctbase, cte, ...) \
00148 switch(typevar) { \
00149 case FLGR_BIT: \
00150 return fctbase##_fgBIT(__VA_ARGS__,FLGR_PVOID_VAL(fgBIT,cte)); \
00151 case FLGR_UINT8: \
00152 return fctbase##_fgUINT8(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT8,cte)); \
00153 case FLGR_UINT16: \
00154 return fctbase##_fgUINT16(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT16,cte)); \
00155 case FLGR_UINT32: \
00156 return fctbase##_fgUINT32(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT32,cte)); \
00157 case FLGR_UINT64: \
00158 return fctbase##_fgUINT64(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT64,cte)); \
00159 case FLGR_INT8: \
00160 return fctbase##_fgINT8(__VA_ARGS__,FLGR_PVOID_VAL(fgINT8,cte)); \
00161 case FLGR_INT16: \
00162 return fctbase##_fgINT16(__VA_ARGS__,FLGR_PVOID_VAL(fgINT16,cte)); \
00163 case FLGR_INT32: \
00164 return fctbase##_fgINT32(__VA_ARGS__,FLGR_PVOID_VAL(fgINT32,cte)); \
00165 case FLGR_INT64: \
00166 return fctbase##_fgINT64(__VA_ARGS__,FLGR_PVOID_VAL(fgINT64,cte)); \
00167 case FLGR_FLOAT32: \
00168 return fctbase##_fgFLOAT32(__VA_ARGS__,FLGR_PVOID_VAL(fgFLOAT32,cte)); \
00169 case FLGR_FLOAT64: \
00170 return fctbase##_fgFLOAT64(__VA_ARGS__,FLGR_PVOID_VAL(fgFLOAT64,cte)); \
00171 default: \
00172 POST_ERROR("type unknown!\n"); \
00173 return fail; \
00174 } \
00175 return fail
00176
00177 #define FLGR_FULL_DISPATCH_CONST_PROCEDURE(typevar, fctbase, cte, ...) \
00178 switch(typevar) { \
00179 case FLGR_BIT: \
00180 fctbase##_fgBIT(__VA_ARGS__,FLGR_PVOID_VAL(fgBIT,cte));break; \
00181 case FLGR_UINT8: \
00182 fctbase##_fgUINT8(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT8,cte));break; \
00183 case FLGR_UINT16: \
00184 fctbase##_fgUINT16(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT16,cte));break; \
00185 case FLGR_UINT32: \
00186 fctbase##_fgUINT32(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT32,cte));break; \
00187 case FLGR_UINT64: \
00188 fctbase##_fgUINT64(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT64,cte));break; \
00189 case FLGR_INT8: \
00190 fctbase##_fgINT8(__VA_ARGS__,FLGR_PVOID_VAL(fgINT8,cte));break; \
00191 case FLGR_INT16: \
00192 fctbase##_fgINT16(__VA_ARGS__,FLGR_PVOID_VAL(fgINT16,cte));break; \
00193 case FLGR_INT32: \
00194 fctbase##_fgINT32(__VA_ARGS__,FLGR_PVOID_VAL(fgINT32,cte));break; \
00195 case FLGR_INT64: \
00196 fctbase##_fgINT64(__VA_ARGS__,FLGR_PVOID_VAL(fgINT64,cte));break; \
00197 case FLGR_FLOAT32: \
00198 fctbase##_fgFLOAT32(__VA_ARGS__,FLGR_PVOID_VAL(fgFLOAT32,cte));break; \
00199 case FLGR_FLOAT64: \
00200 fctbase##_fgFLOAT64(__VA_ARGS__,FLGR_PVOID_VAL(fgFLOAT64,cte));break; \
00201 default: \
00202 POST_ERROR("type unknown!\n"); \
00203 return FLGR_RET_TYPE_UNKNOWN; \
00204 } \
00205 return FLGR_RET_OK
00206
00207
00208 #define FLGR_FULL_DISPATCH_CONST_PTR_FUNCTION(fail, typevar, fctbase, cte, ...) \
00209 switch(typevar) { \
00210 case FLGR_BIT: \
00211 return fctbase##_fgBIT(__VA_ARGS__,FLGR_PVOID_PTR(fgBIT,cte)); \
00212 case FLGR_UINT8: \
00213 return fctbase##_fgUINT8(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT8,cte)); \
00214 case FLGR_UINT16: \
00215 return fctbase##_fgUINT16(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT16,cte)); \
00216 case FLGR_UINT32: \
00217 return fctbase##_fgUINT32(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT32,cte)); \
00218 case FLGR_UINT64: \
00219 return fctbase##_fgUINT64(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT64,cte)); \
00220 case FLGR_INT8: \
00221 return fctbase##_fgINT8(__VA_ARGS__,FLGR_PVOID_PTR(fgINT8,cte)); \
00222 case FLGR_INT16: \
00223 return fctbase##_fgINT16(__VA_ARGS__,FLGR_PVOID_PTR(fgINT16,cte)); \
00224 case FLGR_INT32: \
00225 return fctbase##_fgINT32(__VA_ARGS__,FLGR_PVOID_PTR(fgINT32,cte)); \
00226 case FLGR_INT64: \
00227 return fctbase##_fgINT64(__VA_ARGS__,FLGR_PVOID_PTR(fgINT64,cte)); \
00228 case FLGR_FLOAT32: \
00229 return fctbase##_fgFLOAT32(__VA_ARGS__,FLGR_PVOID_PTR(fgFLOAT32,cte)); \
00230 case FLGR_FLOAT64: \
00231 return fctbase##_fgFLOAT64(__VA_ARGS__,FLGR_PVOID_PTR(fgFLOAT64,cte)); \
00232 default: \
00233 POST_ERROR("type unknown!\n"); \
00234 return fail; \
00235 } \
00236 return fail
00237
00238
00239
00240 #define FLGR_FULL_DISPATCH_CONST_PTR_PROCEDURE(typevar, fctbase, cte, ...) \
00241 switch(typevar) { \
00242 case FLGR_BIT: \
00243 fctbase##_fgBIT(__VA_ARGS__,FLGR_PVOID_PTR(fgBIT,cte));break; \
00244 case FLGR_UINT8: \
00245 fctbase##_fgUINT8(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT8,cte));break; \
00246 case FLGR_UINT16: \
00247 fctbase##_fgUINT16(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT16,cte));break; \
00248 case FLGR_UINT32: \
00249 fctbase##_fgUINT32(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT32,cte));break; \
00250 case FLGR_UINT64: \
00251 fctbase##_fgUINT64(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT64,cte));break; \
00252 case FLGR_INT8: \
00253 fctbase##_fgINT8(__VA_ARGS__,FLGR_PVOID_PTR(fgINT8,cte));break; \
00254 case FLGR_INT16: \
00255 fctbase##_fgINT16(__VA_ARGS__,FLGR_PVOID_PTR(fgINT16,cte));break; \
00256 case FLGR_INT32: \
00257 fctbase##_fgINT32(__VA_ARGS__,FLGR_PVOID_PTR(fgINT32,cte));break; \
00258 case FLGR_INT64: \
00259 fctbase##_fgINT64(__VA_ARGS__,FLGR_PVOID_PTR(fgINT64,cte));break; \
00260 case FLGR_FLOAT32: \
00261 fctbase##_fgFLOAT32(__VA_ARGS__,FLGR_PVOID_PTR(fgFLOAT32,cte));break; \
00262 case FLGR_FLOAT64: \
00263 fctbase##_fgFLOAT64(__VA_ARGS__,FLGR_PVOID_PTR(fgFLOAT64,cte));break; \
00264 default: \
00265 POST_ERROR("type unknown!\n"); \
00266 return FLGR_RET_TYPE_UNKNOWN; \
00267 } \
00268 return FLGR_RET_TYPE_UNKNOWN
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294 #define FLGR_DISPATCH_PROCEDURE(typevar,function_base,...) \
00295 if(typevar == FLGR_BIT) { \
00296 POST_DEBUG("launching "#function_base"_fgBIT\n"); \
00297 function_base##_fgBIT(__VA_ARGS__); \
00298 return FLGR_RET_OK; \
00299 } \
00300 if(typevar==FLGR_UINT8) { \
00301 POST_DEBUG("launching "#function_base"_fgUINT8\n"); \
00302 function_base##_fgUINT8(__VA_ARGS__); \
00303 return FLGR_RET_OK; \
00304 } \
00305 if(typevar==FLGR_UINT16) { \
00306 POST_DEBUG("launching "#function_base"_fgUINT16\n"); \
00307 function_base##_fgUINT16(__VA_ARGS__); \
00308 return FLGR_RET_OK; \
00309 } \
00310 if(typevar==FLGR_UINT32) { \
00311 POST_DEBUG("launching "#function_base"_fgUINT32\n"); \
00312 function_base##_fgUINT32(__VA_ARGS__); \
00313 return FLGR_RET_OK; \
00314 } \
00315 if(typevar==FLGR_INT8) { \
00316 POST_DEBUG("launching "#function_base"_fgINT8\n"); \
00317 function_base##_fgINT8(__VA_ARGS__); \
00318 return FLGR_RET_OK; \
00319 } \
00320 if(typevar==FLGR_INT16) { \
00321 POST_DEBUG("launching "#function_base"_fgINT16\n"); \
00322 function_base##_fgINT16(__VA_ARGS__); \
00323 return FLGR_RET_OK; \
00324 } \
00325 if(typevar==FLGR_INT32) { \
00326 POST_DEBUG("launching "#function_base"_fgINT32\n"); \
00327 function_base##_fgINT32(__VA_ARGS__); \
00328 return FLGR_RET_OK; \
00329 } \
00330 if(typevar==FLGR_FLOAT32) { \
00331 POST_DEBUG("launching "#function_base"_fgFLOAT32\n"); \
00332 function_base##_fgFLOAT32(__VA_ARGS__); \
00333 return FLGR_RET_OK; \
00334 } \
00335 if(typevar==FLGR_FLOAT64) { \
00336 POST_DEBUG("launching "#function_base"_fgFLOAT64\n"); \
00337 function_base##_fgFLOAT64(__VA_ARGS__); \
00338 return FLGR_RET_OK; \
00339 } \
00340 POST_ERROR("type <%s> unknown!\n",flgr_get_type_string(typevar)); \
00341 return FLGR_RET_TYPE_UNKNOWN
00342
00343 #define FLGR_DISPATCH_FUNCTION(fail,typevar,function_base,...) \
00344 if(typevar == FLGR_BIT) { \
00345 POST_DEBUG("launching "#function_base"_fgBIT\n"); \
00346 return function_base##_fgBIT(__VA_ARGS__); \
00347 } \
00348 if(typevar == FLGR_UINT8) { \
00349 POST_DEBUG("launching "#function_base"_fgUINT8\n"); \
00350 return function_base##_fgUINT8(__VA_ARGS__); \
00351 } \
00352 if(typevar == FLGR_UINT16) { \
00353 POST_DEBUG("launching "#function_base"_fgUINT16\n"); \
00354 return function_base##_fgUINT16(__VA_ARGS__); \
00355 } \
00356 if(typevar == FLGR_UINT32) { \
00357 POST_DEBUG("launching "#function_base"_fgUINT32\n"); \
00358 return function_base##_fgUINT32(__VA_ARGS__); \
00359 } \
00360 if(typevar == FLGR_INT8) { \
00361 POST_DEBUG("launching "#function_base"_fgINT8\n"); \
00362 return function_base##_fgINT8(__VA_ARGS__); \
00363 } \
00364 if(typevar == FLGR_INT16) { \
00365 POST_DEBUG("launching "#function_base"_fgINT16\n"); \
00366 return function_base##_fgINT16(__VA_ARGS__); \
00367 } \
00368 if(typevar == FLGR_INT32) { \
00369 POST_DEBUG("launching "#function_base"_fgINT32\n"); \
00370 return function_base##_fgINT32(__VA_ARGS__); \
00371 } \
00372 if(typevar == FLGR_FLOAT32) { \
00373 POST_DEBUG("launching "#function_base"_fgFLOAT32\n"); \
00374 return function_base##_fgFLOAT32(__VA_ARGS__); \
00375 } \
00376 if(typevar == FLGR_FLOAT64) { \
00377 POST_DEBUG("launching "#function_base"_fgFLOAT64\n"); \
00378 return function_base##_fgFLOAT64(__VA_ARGS__); \
00379 } \
00380 POST_ERROR("type <%s> unknown!\n",flgr_get_type_string(typevar)); \
00381 return fail
00382
00383
00384
00385 #define FLGR_DISPATCH_CONST_PROCEDURE(typevar, fctbase, cte, ...) \
00386 switch(typevar) { \
00387 case FLGR_BIT: \
00388 fctbase##_fgBIT(__VA_ARGS__,FLGR_PVOID_VAL(fgBIT,cte));break; \
00389 case FLGR_UINT8: \
00390 fctbase##_fgUINT8(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT8,cte));break; \
00391 case FLGR_UINT16: \
00392 fctbase##_fgUINT16(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT16,cte));break; \
00393 case FLGR_UINT32: \
00394 fctbase##_fgUINT32(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT32,cte));break; \
00395 case FLGR_INT8: \
00396 fctbase##_fgINT8(__VA_ARGS__,FLGR_PVOID_VAL(fgINT8,cte));break; \
00397 case FLGR_INT16: \
00398 fctbase##_fgINT16(__VA_ARGS__,FLGR_PVOID_VAL(fgINT16,cte));break; \
00399 case FLGR_INT32: \
00400 fctbase##_fgINT32(__VA_ARGS__,FLGR_PVOID_VAL(fgINT32,cte));break; \
00401 case FLGR_FLOAT32: \
00402 fctbase##_fgFLOAT32(__VA_ARGS__,FLGR_PVOID_VAL(fgFLOAT32,cte));break; \
00403 case FLGR_FLOAT64: \
00404 fctbase##_fgFLOAT64(__VA_ARGS__,FLGR_PVOID_VAL(fgFLOAT64,cte));break; \
00405 default: \
00406 POST_ERROR("type unknown!\n"); \
00407 return FLGR_RET_TYPE_UNKNOWN; \
00408 } \
00409 return FLGR_RET_OK
00410
00411 #define FLGR_DISPATCH_CONST_FUNCTION(fail,typevar, fctbase, cte, ...) \
00412 switch(typevar) { \
00413 case FLGR_BIT: \
00414 return fctbase##_fgBIT(__VA_ARGS__,FLGR_PVOID_VAL(fgBIT,cte)); \
00415 case FLGR_UINT8: \
00416 return fctbase##_fgUINT8(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT8,cte)); \
00417 case FLGR_UINT16: \
00418 return fctbase##_fgUINT16(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT16,cte)); \
00419 case FLGR_UINT32: \
00420 return fctbase##_fgUINT32(__VA_ARGS__,FLGR_PVOID_VAL(fgUINT32,cte)); \
00421 case FLGR_INT8: \
00422 return fctbase##_fgINT8(__VA_ARGS__,FLGR_PVOID_VAL(fgINT8,cte)); \
00423 case FLGR_INT16: \
00424 return fctbase##_fgINT16(__VA_ARGS__,FLGR_PVOID_VAL(fgINT16,cte)); \
00425 case FLGR_INT32: \
00426 return fctbase##_fgINT32(__VA_ARGS__,FLGR_PVOID_VAL(fgINT32,cte)); \
00427 case FLGR_FLOAT32: \
00428 return fctbase##_fgFLOAT32(__VA_ARGS__,FLGR_PVOID_VAL(fgFLOAT32,cte)); \
00429 case FLGR_FLOAT64: \
00430 return fctbase##_fgFLOAT64(__VA_ARGS__,FLGR_PVOID_VAL(fgFLOAT64,cte)); \
00431 default: \
00432 POST_ERROR("type unknown!\n"); \
00433 return fail; \
00434 } \
00435 return fail
00436
00437 #define FLGR_DISPATCH_CONST_PTR_PROCEDURE(typevar, fctbase, cte, ...) \
00438 switch(typevar) { \
00439 case FLGR_BIT: \
00440 fctbase##_fgBIT(__VA_ARGS__,FLGR_PVOID_PTR(fgBIT,cte));break; \
00441 case FLGR_UINT8: \
00442 fctbase##_fgUINT8(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT8,cte));break; \
00443 case FLGR_UINT16: \
00444 fctbase##_fgUINT16(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT16,cte));break; \
00445 case FLGR_UINT32: \
00446 fctbase##_fgUINT32(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT32,cte));break; \
00447 case FLGR_INT8: \
00448 fctbase##_fgINT8(__VA_ARGS__,FLGR_PVOID_PTR(fgINT8,cte));break; \
00449 case FLGR_INT16: \
00450 fctbase##_fgINT16(__VA_ARGS__,FLGR_PVOID_PTR(fgINT16,cte));break; \
00451 case FLGR_INT32: \
00452 fctbase##_fgINT32(__VA_ARGS__,FLGR_PVOID_PTR(fgINT32,cte));break; \
00453 case FLGR_FLOAT32: \
00454 fctbase##_fgFLOAT32(__VA_ARGS__,FLGR_PVOID_PTR(fgFLOAT32,cte));break; \
00455 case FLGR_FLOAT64: \
00456 fctbase##_fgFLOAT64(__VA_ARGS__,FLGR_PVOID_PTR(fgFLOAT64,cte));break; \
00457 default: \
00458 POST_ERROR("type unknown!\n"); \
00459 return FLGR_RET_TYPE_UNKNOWN; \
00460 } \
00461 return FLGR_RET_OK
00462
00463 #define FLGR_DISPATCH_CONST_PTR_FUNCTION(fail,typevar, fctbase, cte, ...) \
00464 switch(typevar) { \
00465 case FLGR_BIT: \
00466 return fctbase##_fgBIT(__VA_ARGS__,FLGR_PVOID_PTR(fgBIT,cte)); \
00467 case FLGR_UINT8: \
00468 return fctbase##_fgUINT8(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT8,cte)); \
00469 case FLGR_UINT16: \
00470 return fctbase##_fgUINT16(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT16,cte)); \
00471 case FLGR_UINT32: \
00472 return fctbase##_fgUINT32(__VA_ARGS__,FLGR_PVOID_PTR(fgUINT32,cte)); \
00473 case FLGR_INT8: \
00474 return fctbase##_fgINT8(__VA_ARGS__,FLGR_PVOID_PTR(fgINT8,cte)); \
00475 case FLGR_INT16: \
00476 return fctbase##_fgINT16(__VA_ARGS__,FLGR_PVOID_PTR(fgINT16,cte)); \
00477 case FLGR_INT32: \
00478 return fctbase##_fgINT32(__VA_ARGS__,FLGR_PVOID_PTR(fgINT32,cte)); \
00479 case FLGR_FLOAT32: \
00480 return fctbase##_fgFLOAT32(__VA_ARGS__,FLGR_PVOID_PTR(fgFLOAT32,cte)); \
00481 case FLGR_FLOAT64: \
00482 return fctbase##_fgFLOAT64(__VA_ARGS__,FLGR_PVOID_PTR(fgFLOAT64,cte)); \
00483 default: \
00484 POST_ERROR("type unknown!\n"); \
00485 return fail; \
00486 } \
00487 return fail
00488
00489
00490 EXPORT_LIB FLGR_Ret flgr_parse_str_constant(FLGR_Type type, int spp, char *strin, void *constout);
00491 EXPORT_LIB void *flgr_allocate_vector_const(FLGR_Type type, int spp, void *valueForEachVectorElement);
00492
00493
00494
00495 #endif
00496
00497 #ifdef __cplusplus
00498 }
00499 #endif