MeVisLab Toolbox Reference
mlTypeDefs.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_TYPE_DEFS_H
14 #define ML_TYPE_DEFS_H
15 
17 
18 #include "MeVisLabVersion.h"
19 #include "mlMacros.h"
20 
21 // Include global compiler switches for the ML.
22 #include "mlConfig.h"
23 #include "mlUtilities.h"
24 
25 // We always need stdlib.h for, e.g., size_t.
26 #include <ThirdPartyWarningsDisable.h>
27 #include <cstdlib>
28 #include <cstdint>
29 #include <cfloat>
30 
31 #if !defined(WIN32)
32  #include <pthread.h>
33  #include <sys/types.h>
34 #endif
35 
36 #include <ThirdPartyWarningsRestore.h>
37 
38 //---------------------------------------------------------------------------------------------
39 //
40 //
41 // DEFINES
42 //
43 //
44 //---------------------------------------------------------------------------------------------
45 
46 
47 //------------------------------------------------------------------------------------
50 //------------------------------------------------------------------------------------
51 #ifndef ML_NAMESPACE
54  #define ML_NAMESPACE ml
55 #endif
56 
57 #ifndef ML_START_NAMESPACE
61  #define ML_START_NAMESPACE namespace ML_NAMESPACE {
62 #endif
63 
64 #ifndef ML_END_NAMESPACE
67  #define ML_END_NAMESPACE }
68 #endif
70 
71 //--------------------------------------------------------------------------------------------
74 //--------------------------------------------------------------------------------------------
75 
76 //--------------------------------------------------------------------------------------------
79 //--------------------------------------------------------------------------------------------
80 #define ML_PREFIX "ML"
81 
82 //--------------------------------------------------------------------------------------------
85 //--------------------------------------------------------------------------------------------
86 #define ML_CONSTANT_PREFIX "ML_"
87 
88 
89 
90 //--------------------------------------------------------------------------------------------
91 // MLTypes. They define all basic integer datatypes.
92 //--------------------------------------------------------------------------------------------
93 #ifndef _ML_INT8
96  // Should be signed but that causes too many consequences.
97  typedef /*signed*/ char MLint8;
98  typedef /*signed*/ char* MLint8Ptr;
99  #define ML_INT8_MIN -128
100  #define ML_INT8_MAX 0x7F
103  #define _ML_INT8 MLint8
104 #endif
105 
106 #ifndef _ML_UINT8
109  typedef unsigned char MLuint8;
110  typedef unsigned char* MLuint8Ptr;
111  #define ML_UINT8_MIN 0x00
112  #define ML_UINT8_MAX 0xFF
115  #define _ML_UINT8 MLuint8
116 #endif
117 
118 #ifndef _ML_INT16
121  #if (__GNUC__ >= 3)
122  typedef int16_t MLint16;
123  typedef int16_t* MLint16Ptr;
124  #else
125  typedef signed short MLint16;
126  typedef signed short* MLint16Ptr;
127  #endif
128  #define ML_INT16_MIN -32768
129  #define ML_INT16_MAX 0x7FFF
132  #define _ML_INT16 MLint16
133 #endif
134 
135 #ifndef _ML_UINT16
138  #if (__GNUC__ >= 3)
139  typedef uint16_t MLuint16;
140  typedef uint16_t* MLuint16Ptr;
141  #else
142  typedef unsigned short MLuint16;
143  typedef unsigned short* MLuint16Ptr;
144  #endif
145  #define ML_UINT16_MIN 0x0000
146  #define ML_UINT16_MAX 0xFFFF
149  #define _ML_UINT16 MLuint16
150 #endif
151 
152 
153 #ifndef _ML_INT32
156 
157  #if (__GNUC__ >= 3)
158  typedef int32_t MLint32;
159  typedef int32_t* MLint32Ptr;
160  #else
161  typedef signed int MLint32;
162  typedef signed int* MLint32Ptr;
163  #endif
164 
165  // Note: Do not use simply 0x80000000L since that
166  // might be assigned as positive value to
167  // floating point values. Force an explicit cast
168  // to avoid that error. Cast values to avoid that
169  // they are considered as long values.
170  #define ML_INT32_MIN (static_cast<MLint32>(0x80000000L))
171  #define ML_INT32_MAX (static_cast<MLint32>(0x7FFFFFFFL))
174  #define _ML_INT32 MLint32
175 #endif
176 
177 
178 #ifndef _ML_UINT32
181  #if (__GNUC__ >= 3)
182  typedef uint32_t MLuint32;
183  typedef uint32_t* MLuint32Ptr;
184  #else
185  typedef unsigned int MLuint32;
186  typedef unsigned int* MLuint32Ptr;
187  #endif
188 
189  // Cast values to avoid that they are considered as long values.
190  #define ML_UINT32_MIN (static_cast<MLuint32>(0x00000000L))
191  #define ML_UINT32_MAX (static_cast<MLuint32>(0xFFFFFFFFL))
194  #define _ML_UINT32 MLuint32
195 #endif
196 
197 
198 #ifndef _ML_FLOAT
201  typedef float MLfloat;
202  typedef float* MLfloatPtr;
203  #define ML_FLOAT_MIN FLT_MIN
204  #define ML_FLOAT_MAX FLT_MAX
205  #define ML_FLOAT_EPSILON FLT_EPSILON
206  // Use more digits in string representation to retain full precision of binary value:
207  #define ML_FLOAT_DIG (FLT_DIG+2)
210  #define _ML_FLOAT MLfloat
211 #endif
212 
213 
214 #ifndef _ML_DOUBLE
217  typedef double MLdouble;
218  typedef double* MLdoublePtr;
219  #define ML_DOUBLE_MIN DBL_MIN
220  #define ML_DOUBLE_MAX DBL_MAX
221  #define ML_DOUBLE_EPSILON DBL_EPSILON
222  #define ML_DOUBLE_DIG DBL_DIG
225  #define _ML_DOUBLE MLdouble
226 #endif
227 
228 
229 #ifndef _ML_LDOUBLE
232  typedef long double MLldouble;
233  typedef long double* MLldoublePtr;
234  #define ML_LDOUBLE_MIN LDBL_MIN
235  #define ML_LDOUBLE_MAX LDBL_MAX
236  #define ML_LDOUBLE_EPSILON LDBL_EPSILON
237  #define ML_LDOUBLE_DIG LDBL_DIG
240  #define _ML_LDOUBLE MLldouble
241 #endif
242 
243 //--------------------------------------------------------------------------------------------------
246 //--------------------------------------------------------------------------------------------------
247 #define ML_NUM_STANDARD_TYPES 10
248 
249 //--------------------------------------------------------------------------------------------------
252 //--------------------------------------------------------------------------------------------------
253 #define ML_MAX_COMPONENTS_EXTENDED_TYPE 512
254 
255 //--------------------------------------------------------------------------------------------------
258 //--------------------------------------------------------------------------------------------------
260 #define ML_LUMINANCE "LUMINANCE"
262 #define ML_NEGATIVE "NEGATIVE"
264 #define ML_PALETTE "PALETTE"
265 
266 // Codes for multiple channel images.
267 
269 #define ML_RED "RED"
271 #define ML_GREEN "GREEN"
273 #define ML_BLUE "BLUE"
275 #define ML_ALPHA "ALPHA"
276 
278 #define ML_CYAN "CYAN"
280 #define ML_MAGENTA "MAGENTA"
282 #define ML_YELLOW "YELLOW"
284 #define ML_BLACK "BLACK"
285 
287 #define ML_HUE "HUE"
289 #define ML_SATURATION "SATURATION"
291 #define ML_VALUE "VALUE"
293 #define ML_LIGHTNESS "LIGHTNESS"
294 
296 #define ML_YIQ_Y "YIQ_Y"
298 #define ML_YIQ_I "YIQ_I"
300 #define ML_YIQ_Q "YIQ_Q"
301 
305 #define ML_CIE_X "CIE_X"
307 #define ML_CIE_Y "CIE_Y"
309 #define ML_CIE_Z "CIE_Z"
311 #define ML_LUV_L "LUV_L"
313 #define ML_LUV_U "LUV_U"
315 #define ML_LUV_V "LUV_V"
316 
318 #define ML_UNKNOWN "UNKNOWN"
319 
321 
322 
323 //--------------------------------------------------------------------------------------------------
326 //--------------------------------------------------------------------------------------------------
328 #define ML_REAL "REAL_PART"
330 #define ML_IMAG "IMAG_PART"
331 
333 #define ML_V0 "V0"
335 #define ML_V1 "V1"
337 #define ML_V2 "V2"
339 #define ML_V3 "V3"
341 #define ML_V4 "V4"
343 #define ML_V5 "V5"
344 
346 #define ML_MAGNITUDE "MAGNITUDE"
348 #define ML_ANGLE "ANGLE"
350 
351 
352 
353 //------------------------------------------------------------------------------------
354 //
357 //
358 //------------------------------------------------------------------------------------
359 
360 #ifndef ML_QUOTE
363  #define ML_QUOTE_INTERNAL(A) #A
364  #define ML_QUOTE(A) ML_QUOTE_INTERNAL(A)
365 #endif
366 
367 #ifndef ML_LERP
370  #define ML_LERP(a,l,h) ((l)+(((h)-(l))*(a)))
371 #endif
372 
374 
376 #ifndef ML_M_PI
377 # define ML_M_PI 3.14159265358979323846 /* pi */
378 #endif
380 #ifndef ML_M_PI_2
381 # define ML_M_PI_2 1.57079632679489661923 /* pi/2 */
382 #endif
383 
384 //---------------------------------------------------------------------------------------------
385 //
386 //
387 // 64 BIT SUPPORT
388 //
389 //
390 //---------------------------------------------------------------------------------------------
391 
392 //------------------------------------------------------------------------------------
395 //------------------------------------------------------------------------------------
396 #ifndef ML_SYSTEM_HAS_NO_64
397 
399  #ifdef WIN32
400  #include <ThirdPartyWarningsDisable.h>
401  #include <basetsd.h>
402  #include <ThirdPartyWarningsRestore.h>
403  #else
404  #include <cstdint>
405  #endif
406 
407 
408  // Defines MLint64 type and its corresponding pointer type.
409  #if defined(WIN32)
410 
412  typedef INT64 MLint64;
414  typedef INT64* MLint64Ptr;
415 
417  #ifndef INT64_MIN
418  #define INT64_MIN 0x8000000000000000I64
419  #endif
420  #ifndef INT64_MAX
421  #define INT64_MAX 0x7FFFFFFFFFFFFFFFI64
422  #endif
423 
425  typedef UINT64 MLuint64;
427  typedef UINT64* MLuint64Ptr;
428 
430  #ifndef UINT64_MIN
431  #define UINT64_MIN static_cast<MLuint64>(0)
432  #endif
433  #ifndef UINT64_MAX
434  #define UINT64_MAX 0xFFFFFFFFFFFFFFFFUI64
435  #endif
436 
437  #else
439  typedef long long MLint64;
441  typedef MLint64* MLint64Ptr;
442 
444  typedef unsigned long long MLuint64;
446  typedef MLuint64* MLuint64Ptr;
447  #endif
449 
450 #else
451 
454  typedef unsigned char MLint64[8];
455  typedef MLint64* MLint64Ptr;
456  typedef unsigned char MLuint64[8];
457  typedef MLuint64* MLuint64Ptr;
459 
460 #endif
461 
462 
463 #ifndef _ML_INT64
466  #define ML_INT64_MIN INT64_MIN
467  #define ML_INT64_MAX INT64_MAX
470  #define _ML_INT64 MLint64
471 #endif
472 
473 #ifndef _ML_UINT64
476  #define ML_UINT64_MIN static_cast<MLuint64>(0)
477  #define ML_UINT64_MAX UINT64_MAX
480  #define _ML_UINT64 MLuint64
481 #endif
482 
483 //--------------------------------------------------------------------------------------------
486 //--------------------------------------------------------------------------------------------
487 
490 typedef MLint64 MLint;
491 
493 typedef MLint64* MLintPtr;
494 
496 #define ML_INT_MIN ML_INT64_MIN
497 
499 #define ML_INT_MAX ML_INT64_MAX
500 
501 
506 typedef MLuint64 MLuint;
507 
510 
512 #define ML_UINT_MIN UINT64_MIN
513 
515 #define ML_UINT_MAX UINT64_MAX
517 
518 
519 
520 
521 //-------------------------------------------------------------------------------------
524 // Introduce signed and unsigned size and offset types for pointers that are 32-bit
525 // on 32-bit systems and 64-bit on 64-bit systems. This is necessary because integer
526 // is not large enough on 64-bit systems, as it remains 32-bit even on many 64-bit
527 // platforms.
528 // Notes:
529 // - size types should be used for memory, file, array, and object sizes.
530 // - offset types should be used as offsets typically added to pointers.
531 //-------------------------------------------------------------------------------------
532 #ifndef _ML_USIZE_T
534  #define _ML_USIZE_T
535 
538 
540  typedef size_t MLusize_t;
541 
543  #define ML_USIZE_T_MIN ( static_cast<size_t>(0))
544 
546  #define ML_USIZE_T_MAX (~static_cast<size_t>(0))
547 
549  #define ML_SIZE_T_MIN ML_USIZE_T_MIN
550 
552  #define ML_SIZE_T_MAX ML_USIZE_T_MAX
553 
554 #endif
555 
556 
557 #ifndef _ML_SIZE_T
559  #define _ML_SIZE_T
560 
562  typedef MLint MLsoffset;
563 
564  #if defined(WIN32)
566  typedef SSIZE_T MLssize_t;
567  #else
569  typedef ssize_t MLssize_t;
570  #endif
571 
573  #define ML_SSIZE_T_MIN (static_cast<MLssize_t>(1) << (sizeof(MLssize_t)*8-1))
574 
576  // Take the
577  #define ML_SSIZE_T_MAX (static_cast<MLssize_t>(ML_USIZE_T_MAX ^ ML_SSIZE_T_MIN))
578 #endif
579 
581 
582 
583 
584 //---------------------------------------------------------------------------------------------
585 //
586 //
587 // TYPEDEFS, MOSTLY ENUMS
588 //
589 //
590 //---------------------------------------------------------------------------------------------
591 
592 //--------------------------------------------------------------------------------------------------
595 //--------------------------------------------------------------------------------------------------
597 
598 //--------------------------------------------------------------------------------------------------
600 //--------------------------------------------------------------------------------------------------
601 #define ML_UNDEFINED_THREADID 0
602 
603 #ifdef WIN32
605 #else
606 typedef pthread_t MLThreadId;
607 #endif
608 
609 //--------------------------------------------------------------------------------------------------
612 //--------------------------------------------------------------------------------------------------
613 #define ML_INVALID_DATA_TYPE -1
614 
615 //--------------------------------------------------------------------------------------------------
618 //--------------------------------------------------------------------------------------------------
619 typedef enum {
630 
631  // Type ids for extended datatypes:
633 
635 
648 
654 
667 
668  // this type is more or less deprecated
670 
672 
673 //--------------------------------------------------------------------------------------------------
675 //--------------------------------------------------------------------------------------------------
676 typedef enum { ML_RETURN_NULL = 0x0,
681 
682 
683 //--------------------------------------------------------------------------------------------------
685 //--------------------------------------------------------------------------------------------------
686 typedef enum { ML_FINAL_RUNTIME_CHECK_BIT = 0x1,
687  // Todo if memory manager knows how much memory is freed/allocated on reallocs:
688  //ML_FINAL_MEMORY_CHECK_BIT = 0x2, //!< Final checks in the Memory class are activated.
690  ML_ALL_CHECKS_BITS = 0x1
692 
693 //--------------------------------------------------------------------------------------------------
695 //--------------------------------------------------------------------------------------------------
696 typedef enum { ML_WARNING = 0x01,
697  ML_ERROR = 0x02,
698  ML_FATAL = 0x04,
699  ML_DEBUG = 0x08,
700  ML_COUT = 0x10,
701  ML_CERR = 0x20,
704 
706 
707 
708 //-----------------------------------------------------------------------------------
713 
717 
718 // Note: Be sure to cast them all to the correct MLErrorCode type.
719 
721 #define ML_INVALID_ERROR_CODE static_cast<MLErrorCode>(-1)
722 
724 #define ML_RESULT_OK static_cast<MLErrorCode>( 0)
725 
730 #define ML_UNKNOWN_EXCEPTION static_cast<MLErrorCode>( 1)
731 
735 #define ML_NO_MEMORY static_cast<MLErrorCode>( 2)
736 
738 #define ML_DISCONNECTED_GRAPH static_cast<MLErrorCode>( 3)
739 
742 #define ML_CYCLIC_GRAPH static_cast<MLErrorCode>( 4)
743 
745 #define ML_BAD_OPERATOR_POINTER static_cast<MLErrorCode>( 5)
746 
748 #define ML_BAD_OPERATOR_OUTPUT_INDEX static_cast<MLErrorCode>( 6)
749 
751 #define ML_BAD_FIELD static_cast<MLErrorCode>( 7)
752 
757 #define ML_IMAGE_DATA_CALCULATION_FAILED static_cast<MLErrorCode>( 8)
758 
760 #define ML_NO_IMAGE_INPUT_EXTENSION static_cast<MLErrorCode>( 9)
761 
768 #define ML_NO_IMAGE_PROPS static_cast<MLErrorCode>(10)
769 
771 #define ML_BAD_OPERATOR_INPUT_INDEX static_cast<MLErrorCode>(11)
772 
776 #define ML_BAD_INPUT_IMAGE_POINTER static_cast<MLErrorCode>(12)
777 
782 #define ML_BAD_DATA_TYPE static_cast<MLErrorCode>(13)
783 
788 #define ML_PROGRAMMING_ERROR static_cast<MLErrorCode>(14)
789 
795 #define ML_EMPTY_MESSAGE static_cast<MLErrorCode>(15)
796 
803 #define ML_PAGE_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(16)
804 
809 #define ML_PROPERTY_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(17)
810 
816 #define ML_INBOX_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(18)
817 
823 #define ML_BAD_PARAMETER static_cast<MLErrorCode>(19)
824 
832 #define ML_CALCULATION_ERROR static_cast<MLErrorCode>(20)
833 
835 #define ML_BAD_DIMENSION static_cast<MLErrorCode>(21)
836 
849 #define ML_RECURSION_ERROR static_cast<MLErrorCode>(22)
850 
856 #define ML_LIBRARY_LOAD_ERROR static_cast<MLErrorCode>(23)
857 
860 #define ML_FILE_IO_ERROR static_cast<MLErrorCode>(24)
861 
864 #define ML_AFTER_EFFECT static_cast<MLErrorCode>(25)
865 
868 #define ML_BAD_INDEX static_cast<MLErrorCode>(26)
869 
872 #define ML_OUT_OF_RANGE static_cast<MLErrorCode>(27)
873 
877 #define ML_MISSING_VOXEL_TYPE_OPERATIONS static_cast<MLErrorCode>(28)
878 
881 #define ML_BAD_FIELD_TYPE static_cast<MLErrorCode>(29)
882 
884 #define ML_BAD_FIELD_POINTER_OR_NO_MEMORY static_cast<MLErrorCode>(30)
885 
889 #define ML_FIELD_CREATION_ERROR_OR_NO_MEMORY static_cast<MLErrorCode>(31)
890 
892 #define ML_TYPE_INITIALIZATION_ERROR static_cast<MLErrorCode>(32)
893 
895 #define ML_CONSTRUCTOR_EXCEPTION static_cast<MLErrorCode>(33)
896 
899 #define ML_DESTRUCTOR_EXCEPTION static_cast<MLErrorCode>(34)
900 
902 #define ML_TABLE_FULL static_cast<MLErrorCode>(35)
903 
906 #define ML_EXTERNAL_ERROR static_cast<MLErrorCode>(36)
907 
910 #define ML_BAD_BASE_FIELD static_cast<MLErrorCode>(37)
911 
914 #define ML_BAD_BASE_FIELD_CONTENT static_cast<MLErrorCode>(38)
915 
921 #define ML_TYPE_NOT_REGISTERED static_cast<MLErrorCode>(39)
922 
928 #define ML_LIBRARY_INIT_ERROR static_cast<MLErrorCode>(40)
929 
933 #define ML_BAD_POINTER_OR_0 static_cast<MLErrorCode>(41)
934 
938 #define ML_BAD_STATE static_cast<MLErrorCode>(42)
939 
941 #define ML_TOO_MANY_PUSHES_OR_ADDS static_cast<MLErrorCode>(43)
942 
944 #define ML_TOO_MANY_POPS_OR_REMOVES static_cast<MLErrorCode>(44)
945 
947 #define ML_STACK_TABLE_OR_BUFFER_EMPTY static_cast<MLErrorCode>(45)
948 
950 #define ML_STACK_TABLE_OR_BUFFER_NOT_EMPTY static_cast<MLErrorCode>(46)
951 
953 #define ML_ELEMENT_NOT_FOUND static_cast<MLErrorCode>(47)
954 
957 #define ML_INVALID_FILE_NAME static_cast<MLErrorCode>(48)
958 
960 #define ML_INVALID_FILE_DESCRIPTOR static_cast<MLErrorCode>(49)
961 
963 #define ML_FILE_NOT_OPEN static_cast<MLErrorCode>(50)
964 
968 #define ML_NO_OR_INVALID_PERMISSIONS static_cast<MLErrorCode>(51)
969 
972 #define ML_DISK_OR_RESSOURCE_FULL static_cast<MLErrorCode>(52)
973 
979 #define ML_FILE_OR_DATA_STRUCTURE_CORRUPTED static_cast<MLErrorCode>(53)
980 
983 #define ML_INVALID_VERSION static_cast<MLErrorCode>(54)
984 
990 #define ML_UNKNOWN_OR_INVALID_COMPRESSION_SCHEME static_cast<MLErrorCode>(55)
991 
997 #define ML_TYPE_ALREADY_REGISTERED static_cast<MLErrorCode>(56)
998 
1001 #define ML_TYPE_IS_ABSTRACT static_cast<MLErrorCode>(57)
1002 
1005 #define ML_TYPE_NOT_DERIVED_FROM_EXPECTED_PARENT_CLASS static_cast<MLErrorCode>(58)
1006 
1008 #define ML_OPERATION_INTERRUPTED static_cast<MLErrorCode>(59)
1009 
1012 #define ML_BAD_PAGE_ID static_cast<MLErrorCode>(60)
1013 
1017 #define ML_OUT_OF_RESSOURCES static_cast<MLErrorCode>(61)
1018 
1020 #define ML_OBJECT_OR_FILE_EXISTS static_cast<MLErrorCode>(62)
1021 
1023 #define ML_OBJECT_OR_FILE_DOES_NOT_EXIST static_cast<MLErrorCode>(63)
1024 
1026 #define ML_DEADLOCK_WOULD_OCCURR static_cast<MLErrorCode>(64)
1027 
1031 #define ML_COULD_NOT_OPEN_FILE static_cast<MLErrorCode>(65)
1032 
1035 #define ML_COULD_NOT_CREATE_OPEN_OR_MODIFY_FILE ML_COULD_NOT_OPEN_FILE
1036 
1038 #define ML_LIBRARY_UNLOAD_ERROR static_cast<MLErrorCode>(66)
1039 
1041 #define ML_LIBRARY_UNLOAD_EXCEPTION static_cast<MLErrorCode>(67)
1042 
1044 #define ML_NOT_SUPPORTED_ON_THIS_SYSTEM static_cast<MLErrorCode>(68)
1045 
1047 #define ML_OBJECT_STILL_REFERENCED static_cast<MLErrorCode>(69)
1048 
1050 #define ML_REQUEST_OUTSIDE_OF_IMAGE static_cast<MLErrorCode>(70)
1051 
1053 #define MLNumDefaultErrorCodes static_cast<MLErrorCode>(71)
1055 
1056 //--------------------------------------------------------------------------------------------------
1058 //--------------------------------------------------------------------------------------------------
1060 typedef enum { ML_CONTINUE= 0,
1061  ML_ABORT,
1067 
1068 
1069 //--------------------------------------------------------------------------------------------------
1072 //--------------------------------------------------------------------------------------------------
1074 typedef enum { ML_NOTIFY_NO_OBJECT = 0x00000000,
1075  ML_NOTIFY_ERROR_OUTPUT = 0x00010000,
1076  ML_NOTIFY_API = 0x00020000,
1077  ML_NOTIFY_RUNTIME = 0x00040000,
1078  ML_NOTIFY_CACHE = 0x00080000,
1079  ML_NOTIFY_HOST = 0x00100000,
1080  ML_NOTIFY_MODULE = 0x00200000,
1081  ML_NOTIFY_LAST_CLASS = 0x00400000
1083 
1091 
1098 
1101 
1104 
1110 
1115 
1119 
1122 
1123 
1124 
1125 //--------------------------------------------------------------------------------------------------
1128 //--------------------------------------------------------------------------------------------------
1129 typedef enum {
1133 
1134 
1135 //--------------------------------------------------------------------------------------------------
1137 //--------------------------------------------------------------------------------------------------
1138 typedef enum {
1143 
1144 
1146 typedef enum {
1147  ML_VX = 0,
1148  ML_VY = 1,
1149  ML_VZ = 2,
1150  ML_VW = 3,
1151  ML_VC = 3,
1152  ML_VT = 4,
1153  ML_VU = 5
1155 
1156 
1157 //---------------------------------------------------------------------------------------------
1158 //
1159 //
1160 // FUNCTION TYPEDEFS
1161 //
1162 //
1163 //---------------------------------------------------------------------------------------------
1164 
1166 typedef double (*MLDblFuncPtr)(double);
1167 
1168 
1169 //-----------------------------------------------------------------------------------
1171 //-----------------------------------------------------------------------------------
1173 typedef void MLMessageCB(void* usrData,
1174  MLErrorCode errCode,
1175  MLMessageType messageType,
1176  const char* messStr,
1177  int line,
1178  const char** infos);
1179 
1180 
1181 //---------------------------------------------------------------------------------------------
1190 //---------------------------------------------------------------------------------------------
1191 typedef void MLNotifyCB(MLuint32 objType,
1192  void* usrData,
1193  void* objectData1, void* objData2);
1194 
1195 //--------------------------------------------------------------------------------------------------
1198 //--------------------------------------------------------------------------------------------------
1199 typedef void MLSensorCB (void* usrData, void* sensor);
1200 typedef void MLHostProgressCB (void* usrData, const char* info1, const char* info2);
1201 typedef MLint32 MLHostBreakCheckCB (void* usrData, void** hitField);
1202 typedef void MLRequestProgressCB(void* usrData, double progress);
1204 
1205 
1206 //-----------------------------------------------------------------------------------
1207 //
1210 //
1211 //-----------------------------------------------------------------------------------
1212 
1215 typedef const char* MLApplicationGetStringPropertyCB(void* applicationUsrData, const char* propertyName, MLint16* found);
1216 
1218 typedef MLint32 MLApplicationGetInt32PropertyCB (void* applicationUsrData, const char* propertyName, MLint16* found);
1219 
1221 typedef double MLApplicationGetDoublePropertyCB(void* applicationUsrData, const char* propertyName, MLint16* found);
1222 
1225 typedef MLint32 MLApplicationGetBoolPropertyCB (void* applicationUsrData, const char* propertyName, MLint16* found);
1226 
1227 
1228 //--------------------------------------------------------------------------------------------------
1235 //--------------------------------------------------------------------------------------------------
1236 typedef MLint32 MLEventFilterCB (void* usrData, void* event);
1237 
1238 
1239 //--------------------------------------------------------------------------------------------------
1241 //--------------------------------------------------------------------------------------------------
1242 typedef struct
1243 {
1246 
1249 
1252 
1255 
1258 
1260 
1261 
1262 //--------------------------------------------------------------------------------------------------
1272 //--------------------------------------------------------------------------------------------------
1273 typedef void MLEventFilterApplicationHookCB(void* applicationUsrData,
1275  MLEventFilterCB* cb,
1276  void * usrData,
1277  MLuint32 fromMessageId,
1278  MLuint32 toMessageId);
1279 
1280 
1281 
1282 
1283 
1284 //---------------------------------------------------------------------------------------------
1285 //
1286 //
1287 // REGISTERED TYPE SUPPORT
1288 //
1289 //
1290 //---------------------------------------------------------------------------------------------
1291 
1292 //--------------------------------------------------------------------------------------------------
1294 //--------------------------------------------------------------------------------------------------
1296 
1297 //--------------------------------------------------------------------------------------------------
1299 //--------------------------------------------------------------------------------------------------
1300 typedef unsigned char MLTypeData;
1301 
1302 //--------------------------------------------------------------------------------------------------
1304 //--------------------------------------------------------------------------------------------------
1305 struct MLTypeInfos;
1306 
1307 //--------------------------------------------------------------------------------------------------
1310 //--------------------------------------------------------------------------------------------------
1312 
1313 //--------------------------------------------------------------------------------------------------
1315 //--------------------------------------------------------------------------------------------------
1316 typedef enum {
1322 
1323 //--------------------------------------------------------------------------------------------------
1329 //--------------------------------------------------------------------------------------------------
1330 struct MLTypeInfos {
1331 
1334 
1337 
1339  size_t typeSize;
1340 
1342  const char* name;
1343 
1346 
1349 
1352 
1355 
1358 
1361 
1364 
1366  const char** goodCastTos;
1367 
1370 
1385  const char* structInfoString;
1386 
1389 
1392 
1396 
1397  //--------------------------------------------------------------------------------------------------
1400  //--------------------------------------------------------------------------------------------------
1401  typedef void (*Function_SetTo ) (MLTypeData* dest);
1402  typedef bool (*Function_CastToBool ) (const MLTypeData* p);
1403  typedef MLint (*Function_CastToInt ) (const MLTypeData* p);
1405  typedef char* (*Function_GetStringValue ) (const MLTypeData* p);
1406  typedef void (*Function_CastFromInt ) (MLint value, MLTypeData* result);
1407  typedef void (*Function_CastFromDouble ) (MLdouble value, MLTypeData* result);
1408  typedef void (*Function_SetStringValue ) (const char* str, MLTypeData* result);
1409  typedef void (*Function_CopyValue ) (const MLTypeData* source, MLTypeData* dest);
1410  typedef bool (*Function_IsEqualToType ) (const MLTypeData* source1, const MLTypeData* source2);
1411  typedef bool (*Function_IsEqualToTypeWithEpsilon ) (const MLTypeData* source1, const MLTypeData* source2, MLdouble epsilon);
1412  typedef void (*Function_ApplyIntOperation ) (const MLTypeData* source, MLint value, MLTypeData* result);
1413  typedef void (*Function_ApplyDoubleOperation ) (const MLTypeData* source, MLdouble value, MLTypeData* result);
1414  typedef void (*Function_ApplyOperation ) (const MLTypeData* source1, const MLTypeData* source2, MLTypeData* result);
1415  typedef void (*Function_CastToOtherType ) (const MLTypeData* myData, const MLTypeInfos* otherInfos, MLTypeData* otherData);
1416  typedef void (*Function_CastFromOtherType ) (const MLTypeInfos* myInfos, const MLTypeData* myData, MLTypeData* otherData);
1417  typedef void (*Function_MultWithOtherType ) (const MLTypeInfos* myInfos, const MLTypeData* myData, const MLTypeData* otherData, MLTypeData* result);
1418  typedef void (*Function_ArrayCopy ) (const MLTypeData* source, MLTypeData* dest, size_t size);
1419  typedef void (*Function_ArrayFill ) (const MLTypeData* fillValue, MLTypeData* dest, size_t size);
1420  typedef void (*Function_ArrayCopyWithStrides ) (const MLTypeData* source, MLssize_t sourceStride, MLTypeData* dest, MLssize_t destStride, size_t size);
1421  typedef void (*Function_Interpolate ) (const MLTypeData* source1, const MLTypeData* source2, MLdouble alpha, MLTypeData* result);
1422  typedef void (*Function_ArrayRescale ) (const MLTypeData* source, MLdouble scaleFactor, const MLTypeData* offset, MLTypeData* dest, size_t size);
1423  typedef bool (*Function_ArrayEqualsValue ) (const MLTypeData* value, const MLTypeData* buffer, size_t size);
1424  typedef void (*Function_ArrayGetMinMax ) (const MLTypeData* source, size_t size, MLdouble& min, MLdouble& max);
1425  typedef MLdouble (*Function_GetComponent ) (const MLTypeData* source, size_t componentIndex);
1426  typedef void (*Function_SetComponent ) (MLTypeData* dest, size_t componentIndex, MLdouble value);
1428 
1431 
1438 
1457 
1466 
1473 
1476 
1479 
1484 
1489 
1494 
1499 
1504 
1513 
1521 };
1522 
1523 ML_START_NAMESPACE
1524 
1526 
1527 ML_END_NAMESPACE
1528 
1529 
1530 //--------------------------------------------------------------------------------------------------
1534 //--------------------------------------------------------------------------------------------------
1535 #define ML_CALC_FTYPE MLdouble
1536 
1537 //--------------------------------------------------------------------------------------------------
1541 //--------------------------------------------------------------------------------------------------
1542 #define ML_CALC_ITYPE MLint
1543 
1544 
1545 //--------------------------------------------------------------------------------------------------
1548 //--------------------------------------------------------------------------------------------------
1549 #define ML_TYPE_ASSIGN_FUNCTION_POINTERS() \
1550  getStringValue = MLTYPE_getStringValue; \
1551  setStringValue = MLTYPE_setStringValue; \
1552  setToMinimum = MLTYPE_setToMinimum; \
1553  setToMaximum = MLTYPE_setToMaximum; \
1554  setToDefault = MLTYPE_setToDefault; \
1555  getComponent = MLTYPE_getComponent; \
1556  setComponent = MLTYPE_setComponent; \
1557  copy = MLTYPE_copy; \
1558  arrayCopy = MLTYPE_arrayCopy; \
1559  arrayCopyWithStrides = MLTYPE_arrayCopyWithStrides; \
1560  arrayFill = MLTYPE_arrayFill; \
1561  \
1562  castToBool = MLTYPE_castToBool; \
1563  castToInt = MLTYPE_castToInt; \
1564  castToDouble = MLTYPE_castToDouble; \
1565  castToOtherType = MLTYPE_castToOtherType; \
1566  castFromInt = MLTYPE_castFromInt; \
1567  castFromDouble = MLTYPE_castFromDouble; \
1568  castFromOtherType = MLTYPE_castFromOtherType; \
1569  \
1570  isEqualToType = MLTYPE_isEqualToType; \
1571  isEqualToTypeWithEpsilon= MLTYPE_isEqualToTypeWithEpsilon;\
1572  \
1573  negate = MLTYPE_negate; \
1574  normalize = MLTYPE_normalize; \
1575  \
1576  arrayRescale = MLTYPE_arrayRescale; \
1577  interpolate = MLTYPE_interpolate; \
1578  arrayEqualsValue = MLTYPE_arrayEqualsValue; \
1579  arrayGetMinMax = MLTYPE_arrayGetMinMax; \
1580  \
1581  multWithInt = MLTYPE_multWithInt; \
1582  multWithDouble = MLTYPE_multWithDouble; \
1583  multWithType = MLTYPE_multWithType; \
1584  multWithOtherType = MLTYPE_multWithOtherType; \
1585  \
1586  plusInt = MLTYPE_plusInt; \
1587  plusDouble = MLTYPE_plusDouble; \
1588  plusType = MLTYPE_plusType;
1590 
1591 
1592 #endif // __mlTypeDefs_H
1593 
1594 
1595 
MLint32 MLDataType
MLDataType.
Definition: mlTypeDefs.h:596
MLDataTypeIds
MLDataType identifiers.
Definition: mlTypeDefs.h:619
#define ML_MAX_COMPONENTS_EXTENDED_TYPE
Maximum number of components for extended types.
Definition: mlTypeDefs.h:253
@ MLVector8i16Type
Definition: mlTypeDefs.h:661
@ MLVector7fType
Definition: mlTypeDefs.h:641
@ MLVector2fType
Definition: mlTypeDefs.h:636
@ MLMatrix2dType
Definition: mlTypeDefs.h:649
@ MLVector8i32Type
Definition: mlTypeDefs.h:661
@ MLComplexdType
Definition: mlTypeDefs.h:632
@ MLVector64i16Type
Definition: mlTypeDefs.h:666
@ MLVector6fType
Definition: mlTypeDefs.h:640
@ MLVector6i32Type
Definition: mlTypeDefs.h:659
@ MLuint8Type
Enumerator for the unsigned 8-bit ML integer type.
Definition: mlTypeDefs.h:621
@ MLVector2i8Type
Definition: mlTypeDefs.h:655
@ MLVector5i64Type
Definition: mlTypeDefs.h:658
@ MLMatrix6dType
Definition: mlTypeDefs.h:653
@ MLVector2i16Type
Definition: mlTypeDefs.h:655
@ MLVector10i32Type
Definition: mlTypeDefs.h:663
@ MLVector3fType
Definition: mlTypeDefs.h:637
@ MLVector3i16Type
Definition: mlTypeDefs.h:656
@ MLVector7i64Type
Definition: mlTypeDefs.h:660
@ MLQuaternionfType
Definition: mlTypeDefs.h:634
@ MLVector5fType
Definition: mlTypeDefs.h:639
@ MLVector10fType
Definition: mlTypeDefs.h:644
@ MLVector32i8Type
Definition: mlTypeDefs.h:665
@ MLuint32Type
Enumerator for the unsigned 32-bit ML integer type.
Definition: mlTypeDefs.h:625
@ MLComplexfType
Definition: mlTypeDefs.h:632
@ MLMatrix5fType
Definition: mlTypeDefs.h:652
@ MLfloatType
Enumerator for the signed 32-bit ML floating point type.
Definition: mlTypeDefs.h:626
@ MLuint16Type
Enumerator for the unsigned 16-bit ML integer type.
Definition: mlTypeDefs.h:623
@ MLVector9fType
Definition: mlTypeDefs.h:643
@ MLVector7i16Type
Definition: mlTypeDefs.h:660
@ MLVector16fType
Definition: mlTypeDefs.h:645
@ MLVector16i32Type
Definition: mlTypeDefs.h:664
@ MLMatrix3dType
Definition: mlTypeDefs.h:650
@ MLVector64dType
Definition: mlTypeDefs.h:647
@ MLVector4i32Type
Definition: mlTypeDefs.h:657
@ MLVector64i64Type
Definition: mlTypeDefs.h:666
@ MLint64Type
Enumerator for the signed 64-bit ML integer type.
Definition: mlTypeDefs.h:628
@ MLVector32i64Type
Definition: mlTypeDefs.h:665
@ MLVector3i32Type
Definition: mlTypeDefs.h:656
@ MLVector4i64Type
Definition: mlTypeDefs.h:657
@ MLVector16dType
Definition: mlTypeDefs.h:645
@ MLVector3i64Type
Definition: mlTypeDefs.h:656
@ MLVector7i32Type
Definition: mlTypeDefs.h:660
@ MLVector32dType
Definition: mlTypeDefs.h:646
@ MLVector3dType
Definition: mlTypeDefs.h:637
@ MLVector2i64Type
Definition: mlTypeDefs.h:655
@ MLVector32i32Type
Definition: mlTypeDefs.h:665
@ MLMatrix4dType
Definition: mlTypeDefs.h:651
@ MLVector64i8Type
Definition: mlTypeDefs.h:666
@ MLVector5i32Type
Definition: mlTypeDefs.h:658
@ MLVector8fType
Definition: mlTypeDefs.h:642
@ MLMatrix5dType
Definition: mlTypeDefs.h:652
@ MLVector64fType
Definition: mlTypeDefs.h:647
@ MLVector6i8Type
Definition: mlTypeDefs.h:659
@ MLVector2dType
Definition: mlTypeDefs.h:636
@ MLVector5i16Type
Definition: mlTypeDefs.h:658
@ MLVector7dType
Definition: mlTypeDefs.h:641
@ MLint16Type
Enumerator for the signed 16-bit ML integer type.
Definition: mlTypeDefs.h:622
@ MLVector9dType
Definition: mlTypeDefs.h:643
@ MLint32Type
Enumerator for the signed 32-bit ML integer type.
Definition: mlTypeDefs.h:624
@ MLVector4i16Type
Definition: mlTypeDefs.h:657
@ MLVector4fType
Definition: mlTypeDefs.h:638
@ MLVector16i16Type
Definition: mlTypeDefs.h:664
@ MLVector3i8Type
Definition: mlTypeDefs.h:656
@ MLVector4dType
Definition: mlTypeDefs.h:638
@ MLMatrix3fType
Definition: mlTypeDefs.h:650
@ MLVector6dType
Definition: mlTypeDefs.h:640
@ MLMatrix6fType
Definition: mlTypeDefs.h:653
@ MLVector5i8Type
Definition: mlTypeDefs.h:658
@ MLdoubleType
Enumerator for the signed 64-bit ML floating point type.
Definition: mlTypeDefs.h:627
@ MLVector10i8Type
Definition: mlTypeDefs.h:663
@ MLVector6i16Type
Definition: mlTypeDefs.h:659
@ MLVector9i32Type
Definition: mlTypeDefs.h:662
@ MLVector10i16Type
Definition: mlTypeDefs.h:663
@ MLVector2i32Type
Definition: mlTypeDefs.h:655
@ MLVector32i16Type
Definition: mlTypeDefs.h:665
@ MLVector32fType
Definition: mlTypeDefs.h:646
@ MLVector6i64Type
Definition: mlTypeDefs.h:659
@ MLVector64i32Type
Definition: mlTypeDefs.h:666
@ MLQuaterniondType
Definition: mlTypeDefs.h:634
@ MLint8Type
Enumerator for the signed 8-bit ML integer type.
Definition: mlTypeDefs.h:620
@ MLVector9i8Type
Definition: mlTypeDefs.h:662
@ MLVector16i8Type
Definition: mlTypeDefs.h:664
@ MLMatrix4fType
Definition: mlTypeDefs.h:651
@ MLuint64Type
Enumerator for the unsigned 64-bit ML integer type.
Definition: mlTypeDefs.h:629
@ MLMatrix2fType
Definition: mlTypeDefs.h:649
@ MLVector4i8Type
Definition: mlTypeDefs.h:657
@ MLVector7i8Type
Definition: mlTypeDefs.h:660
@ MLVector8i64Type
Definition: mlTypeDefs.h:661
@ MLldoubleType
Definition: mlTypeDefs.h:669
@ MLVector9i16Type
Definition: mlTypeDefs.h:662
@ MLVector10dType
Definition: mlTypeDefs.h:644
@ MLVector8i8Type
Definition: mlTypeDefs.h:661
@ MLVector10i64Type
Definition: mlTypeDefs.h:663
@ MLVector9i64Type
Definition: mlTypeDefs.h:662
@ MLVector8dType
Definition: mlTypeDefs.h:642
@ MLVector5dType
Definition: mlTypeDefs.h:639
@ MLVector16i64Type
Definition: mlTypeDefs.h:664
MLint32 MLErrorCode
Type of an ML Error code.
Definition: mlTypeDefs.h:716
MLCheckBits
Enumerator describing runtime and final checks in the ML.
Definition: mlTypeDefs.h:686
@ ML_FINAL_RUNTIME_CHECK_BIT
Final checks in the RuntimeType system are activated.
Definition: mlTypeDefs.h:686
@ ML_ALL_CHECKS_BITS
All available checks are activated.
Definition: mlTypeDefs.h:690
@ ML_NO_CHECKS_BITS
All checks are deactivated.
Definition: mlTypeDefs.h:689
MLNotifyChangedObjectType
Objects of the ML that call the registered functions when changed.
Definition: mlTypeDefs.h:1090
@ ML_NOTIFY_NO_OBJECT_TYPE
Definition: mlTypeDefs.h:1090
@ ML_NOTIFY_ERROR_OUTPUT_OTHER_CHANGES
Definition: mlTypeDefs.h:1097
@ ML_NOTIFY_ERROR_OUTPUT_TERMINATION_TYPE
Definition: mlTypeDefs.h:1094
@ ML_NOTIFY_CACHE_CLEAR
Definition: mlTypeDefs.h:1105
@ ML_NOTIFY_HOST_MAX_NUM_THREADS
Definition: mlTypeDefs.h:1111
@ ML_NOTIFY_CACHE_MONITORING_LEVEL
Definition: mlTypeDefs.h:1109
@ ML_NOTIFY_ERROR_OUTPUT_MESSAGE_FILTER
Definition: mlTypeDefs.h:1095
@ ML_NOTIFY_ERROR_OUTPUT_FULL_DEBUGGING
Definition: mlTypeDefs.h:1093
@ ML_NOTIFY_MODULE_INSTANTIATED
Definition: mlTypeDefs.h:1117
@ ML_NOTIFY_API_EXCEPTIONS
Definition: mlTypeDefs.h:1099
@ ML_NOTIFY_HOST_USE_CLASSIC_HOST
Definition: mlTypeDefs.h:1114
@ ML_NOTIFY_ERROR_OUTPUT_ERROR_OUTPUT_CB
Definition: mlTypeDefs.h:1092
@ ML_NOTIFY_CACHE_MEM_OPT_LEVEL
Definition: mlTypeDefs.h:1106
@ ML_NOTIFY_RUNTIME_TYPE_ADDED
Definition: mlTypeDefs.h:1102
@ ML_NOTIFY_HOST_BREAK_CHECK_CB
Definition: mlTypeDefs.h:1112
@ ML_NOTIFY_API_CHECKS_BITS
Definition: mlTypeDefs.h:1100
@ ML_NOTIFY_MODULE_DELETED
Definition: mlTypeDefs.h:1118
@ ML_NOTIFY_CACHE_MAX_SIZE
Definition: mlTypeDefs.h:1108
@ ML_NOTIFY_RUNTIME_TYPE_REMOVED
Definition: mlTypeDefs.h:1103
@ ML_NOTIFY_FIELD_HANDLED
Definition: mlTypeDefs.h:1116
@ ML_NOTIFY_ERROR_OUTPUT_DEBUG_ENV_NAMES
Definition: mlTypeDefs.h:1096
@ ML_NOTIFY_CACHE_FLUSH
Definition: mlTypeDefs.h:1107
@ ML_NOTIFY_HOST_PROGRESS_CB
Definition: mlTypeDefs.h:1113
MLuint64 MLTypePropertyBits
Structure to define a bit mask that identifies all implemented functions for a data type.
Definition: mlTypeDefs.h:1295
signed short * MLint16Ptr
Definition: mlTypeDefs.h:126
MLTerminator
Termination types for error handling.
Definition: mlTypeDefs.h:1060
@ ML_EXITCODE
Terminates the application with exit(ErrorCode), not recommended for use in normal code.
Definition: mlTypeDefs.h:1064
@ ML_EXIT0
Terminates the application with exit(0), not recommended for use in normal code.
Definition: mlTypeDefs.h:1063
@ ML_ABORT
Uses abort() to terminate the application which supports easily to start the debugger.
Definition: mlTypeDefs.h:1061
@ MLNumTerminators
Definition: mlTypeDefs.h:1065
@ ML_CONTINUE
Tries to ignore the message and to continue.
Definition: mlTypeDefs.h:1060
double(* MLDblFuncPtr)(double)
A function pointer type to a function that returns a double and takes a double as argument.
Definition: mlTypeDefs.h:1166
MLint32 MLApplicationGetInt32PropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get an integer value property with the propertyNa...
Definition: mlTypeDefs.h:1218
UINT64 MLuint64
Introduce platform-independent 64-bit unsigned integer type.
Definition: mlTypeDefs.h:425
float * MLfloatPtr
Definition: mlTypeDefs.h:202
MLMemoryErrorHandling
Enumerator to specify memory error handling.
Definition: mlTypeDefs.h:676
@ ML_FATAL_MEMORY_ERROR
On allocation failure, a fatal error print is done and NULL is returned.
Definition: mlTypeDefs.h:677
@ ML_THROW_NO_MEMORY
On allocation failure, a throw(ML_NO_MEMORY) is executed.
Definition: mlTypeDefs.h:678
@ ML_RETURN_NULL
On allocation failure, NULL is returned without error handling.
Definition: mlTypeDefs.h:676
@ ML_FATAL_MEMORY_ERROR_AND_THROW_NO_MEMORY
On allocation failure, a fatal error is posted and ML_NO_MEMORY is thrown.
Definition: mlTypeDefs.h:679
long double MLldouble
Definition: mlTypeDefs.h:232
MLNotifyChangedClassType
Codes for ML classes that may change:
Definition: mlTypeDefs.h:1074
@ ML_NOTIFY_MODULE
0x0020 = Module
Definition: mlTypeDefs.h:1080
@ ML_NOTIFY_API
0x0002 = API
Definition: mlTypeDefs.h:1076
@ ML_NOTIFY_CACHE
0x0008 = Cache
Definition: mlTypeDefs.h:1078
@ ML_NOTIFY_NO_OBJECT
0x0000 = No object
Definition: mlTypeDefs.h:1074
@ ML_NOTIFY_LAST_CLASS
Definition: mlTypeDefs.h:1081
@ ML_NOTIFY_HOST
0x0010 = Host
Definition: mlTypeDefs.h:1079
@ ML_NOTIFY_RUNTIME
0x0004 = Runtime
Definition: mlTypeDefs.h:1077
@ ML_NOTIFY_ERROR_OUTPUT
0x0001 = ErrorOutput
Definition: mlTypeDefs.h:1075
long double * MLldoublePtr
Definition: mlTypeDefs.h:233
MLint MLsoffset
Signed ML offset type that is a 32-bit signed integer on 32-bit platforms and a 64-bit integer on 64-...
Definition: mlTypeDefs.h:562
MLint64 * MLintPtr
A pointer to the signed ML integer type MLint.
Definition: mlTypeDefs.h:493
char * MLint8Ptr
Definition: mlTypeDefs.h:98
UINT64 * MLuint64Ptr
Introduce platform-independent 64-bit unsigned integer pointer type.
Definition: mlTypeDefs.h:427
MLuint32 MLThreadId
Definition: mlTypeDefs.h:604
MLint32 MLHostBreakCheckCB(void *usrData, void **hitField)
Definition: mlTypeDefs.h:1201
unsigned int MLuint32
Definition: mlTypeDefs.h:185
MLArrayIndex
Indexes for axes, arrays and vectors.
Definition: mlTypeDefs.h:1146
@ ML_VT
Array index for t (time) components (entry 4)
Definition: mlTypeDefs.h:1152
@ ML_VC
Array index for c (color) components (entry 3)
Definition: mlTypeDefs.h:1151
@ ML_VY
Array index for y components (entry 1)
Definition: mlTypeDefs.h:1148
@ ML_VU
Array index for u (unit/user dimension) components (entry 5)
Definition: mlTypeDefs.h:1153
@ ML_VZ
Array index for z components (entry 2)
Definition: mlTypeDefs.h:1149
@ ML_VW
Array index for w (for components of homogeneous vectors, entry 3)
Definition: mlTypeDefs.h:1150
@ ML_VX
Array index for x components (entry 0)
Definition: mlTypeDefs.h:1147
unsigned char MLuint8
Definition: mlTypeDefs.h:109
void MLRequestProgressCB(void *usrData, double progress)
Definition: mlTypeDefs.h:1202
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
Definition: mlTypeDefs.h:506
double MLdouble
Definition: mlTypeDefs.h:217
unsigned char * MLuint8Ptr
Definition: mlTypeDefs.h:110
MLEventFilterApplicationMessage
Enum to describe the significance of the call, e.g., whether an 'add' or a 'remove' of a function is ...
Definition: mlTypeDefs.h:1129
@ ML_EVENTFILTER_REMOVE_CB
Definition: mlTypeDefs.h:1131
@ ML_EVENTFILTER_ADD_CB
Definition: mlTypeDefs.h:1130
unsigned int * MLuint32Ptr
Definition: mlTypeDefs.h:186
void MLEventFilterApplicationHookCB(void *applicationUsrData, MLEventFilterApplicationMessage type, MLEventFilterCB *cb, void *usrData, MLuint32 fromMessageId, MLuint32 toMessageId)
Internal application event filter callback type.
Definition: mlTypeDefs.h:1273
unsigned char MLTypeData
This is the pointer type used to point to the data of MLType data instances.
Definition: mlTypeDefs.h:1300
MLTypeGroupIds
Some predefined type groups.
Definition: mlTypeDefs.h:1316
@ MLNoTypeGroup
Definition: mlTypeDefs.h:1317
@ MLMatrixTypeGroup
Definition: mlTypeDefs.h:1320
@ MLScalarTypeGroup
Definition: mlTypeDefs.h:1318
@ MLVectorTypeGroup
Definition: mlTypeDefs.h:1319
unsigned short MLuint16
Definition: mlTypeDefs.h:142
signed short MLint16
Definition: mlTypeDefs.h:125
char MLint8
Definition: mlTypeDefs.h:97
void MLSensorCB(void *usrData, void *sensor)
Definition: mlTypeDefs.h:1199
INT64 MLint64
Include 64-bit integer support for Windows or Unix.
Definition: mlTypeDefs.h:412
const char * MLApplicationGetStringPropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get a string value property with the propertyName...
Definition: mlTypeDefs.h:1215
unsigned short * MLuint16Ptr
Definition: mlTypeDefs.h:143
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:490
signed int * MLint32Ptr
Definition: mlTypeDefs.h:162
double MLApplicationGetDoublePropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get a double value property with the propertyName...
Definition: mlTypeDefs.h:1221
void MLMessageCB(void *usrData, MLErrorCode errCode, MLMessageType messageType, const char *messStr, int line, const char **infos)
Handling/setting/getting of ML messages callbacks.
Definition: mlTypeDefs.h:1173
MLint32 MLApplicationGetBoolPropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get a bool value property with the propertyName f...
Definition: mlTypeDefs.h:1225
MLuint64 MLuoffset
Unsigned ML offset type that is a 32-bit unsigned integer on 32-bit platforms and 64-bit one on 64-bi...
Definition: mlTypeDefs.h:537
void MLNotifyCB(MLuint32 objType, void *usrData, void *objectData1, void *objData2)
Function type that is registered by the Notify object; it receives a code objType of type MLNotifyCha...
Definition: mlTypeDefs.h:1191
MLint32 MLEventFilterCB(void *usrData, void *event)
Callback function type for events that are passed to the user.
Definition: mlTypeDefs.h:1236
SSIZE_T MLssize_t
The signed ML size type that is a signed 32-bit size_t on 32-bit platforms and 64-bit one on 64-bit p...
Definition: mlTypeDefs.h:566
INT64 * MLint64Ptr
Introduce platform-independent 64-bit signed integer pointer type.
Definition: mlTypeDefs.h:414
signed int MLint32
Definition: mlTypeDefs.h:161
size_t MLusize_t
The unsigned ML size type that is an unsigned 32-bit size_t on 32-bit platforms and 64-bit one on 64-...
Definition: mlTypeDefs.h:540
void MLHostProgressCB(void *usrData, const char *info1, const char *info2)
Definition: mlTypeDefs.h:1200
MLuint64 * MLuintPtr
A pointer to the unsigned ML integer type MLuint.
Definition: mlTypeDefs.h:509
MLint32 MLTypeGroup
This is an identifier to differentiate types like matrices, vectors, and complex/quaternion types,...
Definition: mlTypeDefs.h:1305
double * MLdoublePtr
Definition: mlTypeDefs.h:218
MLMessageType
Message types handled by the ErrorOutput class.
Definition: mlTypeDefs.h:696
@ ML_COUT
Definition: mlTypeDefs.h:700
@ ML_WARNING
Definition: mlTypeDefs.h:696
@ ML_DEBUG
Definition: mlTypeDefs.h:699
@ ML_ALL_MESSAGES
Definition: mlTypeDefs.h:705
@ ML_CERR
Definition: mlTypeDefs.h:701
@ ML_ERROR
Definition: mlTypeDefs.h:697
@ ML_FATAL
Definition: mlTypeDefs.h:698
@ ML_INFORMATION
Definition: mlTypeDefs.h:702
@ ML_OTHER_MESSAGE
Definition: mlTypeDefs.h:703
float MLfloat
Definition: mlTypeDefs.h:201
MLSign
Definition of possible signs as enumerator.
Definition: mlTypeDefs.h:1138
@ ML_NEGATIVE_SIGN
Negative sign enumerator.
Definition: mlTypeDefs.h:1140
@ ML_ZERO_SIGN
Enumerator for no negative and no positive sign (=0).
Definition: mlTypeDefs.h:1139
@ ML_POSITIVE_SIGN
Positive sign enumerator.
Definition: mlTypeDefs.h:1141
#define ML_UTILS_EXPORT
Definition: mlUtilities.h:18
boost::graph_traits< ml_graph_ptr >::vertex_descriptor source(graph_traits< ml_graph_ptr >::edge_descriptor e, const ml_graph_ptr)
Returns the vertex descriptor for u of the edge (u,v) represented by e.
void ML_UTILS_EXPORT logTypeComponentsFromStringError(const char *function)
Defines all callbacks that an application has to support for property access.
Definition: mlTypeDefs.h:1243
MLApplicationGetDoublePropertyCB * _getDoubleCB
Callback to be set by an application to return a double property.
Definition: mlTypeDefs.h:1251
MLApplicationGetBoolPropertyCB * _getBoolCB
Callback to be set by an application to return a boolean property.
Definition: mlTypeDefs.h:1254
MLApplicationGetStringPropertyCB * _getStringCB
Callback to be set by an application to return a string property.
Definition: mlTypeDefs.h:1245
MLApplicationGetInt32PropertyCB * _getInt32CB
Callback to be set by an application to return a int32 property.
Definition: mlTypeDefs.h:1248
void * _applicationUsrData
Defines the user data that is supplied with all callbacks.
Definition: mlTypeDefs.h:1257
Structure containing all data type features and pointers to all functions needed to implement operati...
Definition: mlTypeDefs.h:1330
void(* Function_CastToOtherType)(const MLTypeData *myData, const MLTypeInfos *otherInfos, MLTypeData *otherData)
Definition: mlTypeDefs.h:1415
Function_CastFromDouble castFromDouble
Casts the first (the double) parameter to the data type and returns it into second parameter.
Definition: mlTypeDefs.h:1470
Function_GetStringValue getStringValue
Returns a value as a string.
Definition: mlTypeDefs.h:1435
bool(* Function_CastToBool)(const MLTypeData *p)
Definition: mlTypeDefs.h:1402
void(* Function_ArrayCopyWithStrides)(const MLTypeData *source, MLssize_t sourceStride, MLTypeData *dest, MLssize_t destStride, size_t size)
Definition: mlTypeDefs.h:1420
Function_IsEqualToType isEqualToType
Returns true if both parameters are equal; otherwise, it returns false.
Definition: mlTypeDefs.h:1475
Function_ArrayFill arrayFill
Sets the first parameter to array at the second one.
Definition: mlTypeDefs.h:1456
const MLTypeData * typeDefaultPtr
Data type default specified by derived class.
Definition: mlTypeDefs.h:1360
Function_ArrayCopyWithStrides arrayCopyWithStrides
Same as arrayCopy, but allows to specify stride values for source and destination.
Definition: mlTypeDefs.h:1454
MLint(* Function_CastToInt)(const MLTypeData *p)
Definition: mlTypeDefs.h:1403
void(* Function_CastFromInt)(MLint value, MLTypeData *result)
Definition: mlTypeDefs.h:1406
Function_SetStringValue setStringValue
Try to convert string as far as possible. If string cannot be scanned at all, then use the data type ...
Definition: mlTypeDefs.h:1437
Function_CopyValue normalize
Normalizes the type value from parameter 1 and writes it into parameter 2.
Definition: mlTypeDefs.h:1483
void(* Function_SetStringValue)(const char *str, MLTypeData *result)
Definition: mlTypeDefs.h:1408
bool(* Function_IsEqualToTypeWithEpsilon)(const MLTypeData *source1, const MLTypeData *source2, MLdouble epsilon)
Definition: mlTypeDefs.h:1411
MLTypeGroup typeGroup
Type group to which this type belongs.
Definition: mlTypeDefs.h:1391
void(* Function_ArrayCopy)(const MLTypeData *source, MLTypeData *dest, size_t size)
Definition: mlTypeDefs.h:1418
Function_ApplyIntOperation multWithInt
Implements multiplication with integer. Result is written into parameter three.
Definition: mlTypeDefs.h:1506
size_t componentOffsets[ML_MAX_COMPONENTS_EXTENDED_TYPE]
Array of offsets from the first to other components to address any component directly.
Definition: mlTypeDefs.h:1369
void(* Function_ArrayFill)(const MLTypeData *fillValue, MLTypeData *dest, size_t size)
Definition: mlTypeDefs.h:1419
Function_SetTo setToMaximum
Sets the value to minimum value. Must be implemented.
Definition: mlTypeDefs.h:1442
Function_ArrayCopy arrayCopy
Copies the number of elements of the first parameter to the second one.
Definition: mlTypeDefs.h:1452
Function_SetTo setToDefault
Sets the value to default value. Must be implemented.
Definition: mlTypeDefs.h:1444
Function_GetComponent getComponent
Returns the n-th component of the type as double.
Definition: mlTypeDefs.h:1446
Function_CopyValue copy
Copies the first parameter to the second one.
Definition: mlTypeDefs.h:1450
const MLTypeData * typeMinPtr
Data type minimum specified by derived class.
Definition: mlTypeDefs.h:1354
Function_ApplyIntOperation plusInt
Implements integer addition to parameter one. Result is written into parameter three.
Definition: mlTypeDefs.h:1515
void(* Function_SetComponent)(MLTypeData *dest, size_t componentIndex, MLdouble value)
Definition: mlTypeDefs.h:1426
void(* Function_CastFromDouble)(MLdouble value, MLTypeData *result)
Definition: mlTypeDefs.h:1407
void(* Function_SetTo)(MLTypeData *dest)
Definition: mlTypeDefs.h:1401
void(* Function_Interpolate)(const MLTypeData *source1, const MLTypeData *source2, MLdouble alpha, MLTypeData *result)
Definition: mlTypeDefs.h:1421
void(* Function_ApplyDoubleOperation)(const MLTypeData *source, MLdouble value, MLTypeData *result)
Definition: mlTypeDefs.h:1413
const MLTypeData * typeMaxPtr
Data type maximum specified by derived class.
Definition: mlTypeDefs.h:1357
void(* Function_ApplyIntOperation)(const MLTypeData *source, MLint value, MLTypeData *result)
Definition: mlTypeDefs.h:1412
const char * structInfoString
Pointer to a NULL-terminated string describing the type configuration.
Definition: mlTypeDefs.h:1385
Function_ArrayEqualsValue arrayEqualsValue
Checks whether the first argument equals all the values given with the second argument (and the size ...
Definition: mlTypeDefs.h:1493
bool(* Function_IsEqualToType)(const MLTypeData *source1, const MLTypeData *source2)
Definition: mlTypeDefs.h:1410
MLdouble(* Function_GetComponent)(const MLTypeData *source, size_t componentIndex)
Definition: mlTypeDefs.h:1425
Function_CastToDouble castToDouble
Returns a type value cast to double.
Definition: mlTypeDefs.h:1463
void(* Function_MultWithOtherType)(const MLTypeInfos *myInfos, const MLTypeData *myData, const MLTypeData *otherData, MLTypeData *result)
Definition: mlTypeDefs.h:1417
Function_CopyValue negate
Negates the value.
Definition: mlTypeDefs.h:1481
MLint32 dataTypeId
Real MLDataType id of under which these operations are registered as data type.
Definition: mlTypeDefs.h:1388
void(* Function_CopyValue)(const MLTypeData *source, MLTypeData *dest)
Definition: mlTypeDefs.h:1409
void(* Function_CastFromOtherType)(const MLTypeInfos *myInfos, const MLTypeData *myData, MLTypeData *otherData)
Definition: mlTypeDefs.h:1416
Function_ApplyOperation plusType
Implements parameter two addition to parameter one. Result is written into parameter three.
Definition: mlTypeDefs.h:1519
Function_ApplyOperation multWithType
Implements multiplication with its own type. Result is written into parameter three.
Definition: mlTypeDefs.h:1510
size_t numGoodCastTos
Number of datatypes to which this type can be cast without information or functionality loss.
Definition: mlTypeDefs.h:1363
MLDataType rangeAndPrecisionEquivalent
Standard data type which has a comparable range and precision behavior.
Definition: mlTypeDefs.h:1345
Function_ApplyDoubleOperation plusDouble
Implements double addition to parameter one. Result is written into parameter three.
Definition: mlTypeDefs.h:1517
size_t typeSize
sizeof the data type in bytes.
Definition: mlTypeDefs.h:1339
Function_CastToOtherType castToOtherType
Casts data to another registered type.
Definition: mlTypeDefs.h:1465
Function_ArrayRescale arrayRescale
Scales the values from the first parameter with the second parameter and offsets it with the value fr...
Definition: mlTypeDefs.h:1488
char *(* Function_GetStringValue)(const MLTypeData *p)
Definition: mlTypeDefs.h:1405
MLdouble dblMin
double minimum of data type if it exists.
Definition: mlTypeDefs.h:1348
Function_IsEqualToTypeWithEpsilon isEqualToTypeWithEpsilon
Returns true if both parameters are equal within a static epsilon; otherwise, it returns false.
Definition: mlTypeDefs.h:1478
void(* Function_ApplyOperation)(const MLTypeData *source1, const MLTypeData *source2, MLTypeData *result)
Definition: mlTypeDefs.h:1414
void(* Function_ArrayRescale)(const MLTypeData *source, MLdouble scaleFactor, const MLTypeData *offset, MLTypeData *dest, size_t size)
Definition: mlTypeDefs.h:1422
const char * name
Pointer to the data type name.
Definition: mlTypeDefs.h:1342
Function_ApplyDoubleOperation multWithDouble
Implements multiplication with double. Result is written into parameter three.
Definition: mlTypeDefs.h:1508
Function_ArrayGetMinMax arrayGetMinMax
Returns the minimum and maximum component values from the array in the first argument,...
Definition: mlTypeDefs.h:1498
bool(* Function_ArrayEqualsValue)(const MLTypeData *value, const MLTypeData *buffer, size_t size)
Definition: mlTypeDefs.h:1423
Function_CastFromOtherType castFromOtherType
Casts another registered type to data.
Definition: mlTypeDefs.h:1472
Function_CastToBool castToBool
Returns a type value cast to bool. Usually an equality to 0 should return false, e....
Definition: mlTypeDefs.h:1459
MLdouble dblMax
double maximum of data type if it exists.
Definition: mlTypeDefs.h:1351
Function_SetTo setToMinimum
Sets the value to minimum value. Must be implemented.
Definition: mlTypeDefs.h:1440
Function_CastToInt castToInt
Returns a type value cast to integer.
Definition: mlTypeDefs.h:1461
Function_SetComponent setComponent
Sets the n-th component of the type from double (applying rounding if needed).
Definition: mlTypeDefs.h:1448
void(* Function_ArrayGetMinMax)(const MLTypeData *source, size_t size, MLdouble &min, MLdouble &max)
Definition: mlTypeDefs.h:1424
const char ** goodCastTos
Data types names to which this type can be cast without information or functionality loss.
Definition: mlTypeDefs.h:1366
Function_CastFromInt castFromInt
Casts the first (the integer) parameter to the data type and returns it into second parameter.
Definition: mlTypeDefs.h:1468
MLdouble(* Function_CastToDouble)(const MLTypeData *p)
Definition: mlTypeDefs.h:1404
size_t numComponents
Number of components of this data type. Equals number of characters in *structInfoString.
Definition: mlTypeDefs.h:1336
Function_Interpolate interpolate
Interpolates linearly between the first and the second parameter, at the position given by the third ...
Definition: mlTypeDefs.h:1503
MLTypePropertyBits propertyBits
Variable containing an enabled bit for each defined property.
Definition: mlTypeDefs.h:1394
Function_MultWithOtherType multWithOtherType
Implements multiplication with another type. Result is written into parameter three.
Definition: mlTypeDefs.h:1512