MeVisLabToolboxReference
mlTypeDefs.h
Go to the documentation of this file.
1 // **InsertLicense** code
2 //--------------------------------------------------------------------------------------
5 
10 //--------------------------------------------------------------------------------------
11 #ifndef __mlTypeDefs_H
12 #define __mlTypeDefs_H
13 
14 #include "mlMacros.h"
15 
16 // Include global compiler switches for the ML.
17 #ifndef __mlConfig_H
18  #include "mlConfig.h"
19 #endif
20 
21 // We always need stdlib.h for e.g., size_t.
23 #include <cstdlib>
24 
25 #if defined(_MSC_VER) && _MSC_VER >= 1600
26  #include <cstdint>
27 #endif
28 
29 #if !defined(WIN32)
30 # include <pthread.h>
31 #endif
33 
34 
35 //---------------------------------------------------------------------------------------------
36 // Check for 64 bit system.
37 //---------------------------------------------------------------------------------------------
38 
39 // WIN64 check.
40 #ifdef _WIN64
41  #define ML_IS_64_BIT_SYSTEM
43 #endif
44 
45 // Unix check.
46 #if defined (__GNUC__) && (__GNUC__ >= 3)
47 
49  #include <unistd.h>
50 
52  #include <cstdint>
53 
55  #include <cfloat>
56 
57  // Check word size definition from standard integer include.
58  #if defined(__LP64__)
59  #define ML_IS_64_BIT_SYSTEM
61  #endif
62 #endif
63 
64 
65 
66 //---------------------------------------------------------------------------------------------
67 //
68 //
69 // DEFINES
70 //
71 //
72 //---------------------------------------------------------------------------------------------
73 
74 
75 //------------------------------------------------------------------------------------
77 
78 //------------------------------------------------------------------------------------
79 #ifndef ML_NAMESPACE
80  #define ML_NAMESPACE ml
83 #endif
84 
85 #ifndef ML_START_NAMESPACE
86  #define ML_START_NAMESPACE namespace ML_NAMESPACE {
90 #endif
91 
92 #ifndef ML_END_NAMESPACE
93  #define ML_END_NAMESPACE }
96 #endif
97 
98 
99 //--------------------------------------------------------------------------------------------
101 
102 //--------------------------------------------------------------------------------------------
103 
104 //--------------------------------------------------------------------------------------------
107 //--------------------------------------------------------------------------------------------
108 #define ML_PREFIX "ML"
109 
110 //--------------------------------------------------------------------------------------------
113 //--------------------------------------------------------------------------------------------
114 #define ML_CONSTANT_PREFIX "ML_"
115 
116 
117 
118 //--------------------------------------------------------------------------------------------
119 // MLTypes. They define all basic integer data types.
120 //--------------------------------------------------------------------------------------------
121 #ifndef _ML_INT8
122 
124  // Should be signed but that causes too many consequences.
125  typedef /*signed*/ char MLint8;
126  typedef /*signed*/ char* MLint8Ptr;
127  #define ML_INT8_MIN -128
128  #define ML_INT8_MAX 0x7F
129 
130  #define _ML_INT8 MLint8
132 #endif
133 
134 #ifndef _ML_UINT8
135 
137  typedef unsigned char MLuint8;
138  typedef unsigned char* MLuint8Ptr;
139  #define ML_UINT8_MIN 0x00
140  #define ML_UINT8_MAX 0xFF
141 
142  #define _ML_UINT8 MLuint8
144 #endif
145 
146 #ifndef _ML_INT16
147 
149  #if (__GNUC__ >= 3)
150  typedef int16_t MLint16;
151  typedef int16_t* MLint16Ptr;
152  #else
153  typedef signed short MLint16;
154  typedef signed short* MLint16Ptr;
155  #endif
156  #define ML_INT16_MIN -32768
157  #define ML_INT16_MAX 0x7FFF
158 
159  #define _ML_INT16 MLint16
161 #endif
162 
163 #ifndef _ML_UINT16
164 
166  #if (__GNUC__ >= 3)
167  typedef uint16_t MLuint16;
168  typedef uint16_t* MLuint16Ptr;
169  #else
170  typedef unsigned short MLuint16;
171  typedef unsigned short* MLuint16Ptr;
172  #endif
173  #define ML_UINT16_MIN 0x0000
174  #define ML_UINT16_MAX 0xFFFF
175 
176  #define _ML_UINT16 MLuint16
178 #endif
179 
180 
181 #ifndef _ML_INT32
182 
184 
185  #if (__GNUC__ >= 3)
186  typedef int32_t MLint32;
187  typedef int32_t* MLint32Ptr;
188  #else
189  typedef signed int MLint32;
190  typedef signed int* MLint32Ptr;
191  #endif
192 
193  // Note: Do not use simply 0x80000000L since that
194  // might be assigned as positive value to
195  // floating point values. Force an explicit cast
196  // to avoid that error. Cast values to avoid that
197  // they are considered as long values.
198  #define ML_INT32_MIN (static_cast<MLint32>(0x80000000L))
199  #define ML_INT32_MAX (static_cast<MLint32>(0x7FFFFFFFL))
200 
201  #define _ML_INT32 MLint32
203 #endif
204 
205 
206 #ifndef _ML_UINT32
207 
209  #if (__GNUC__ >= 3)
210  typedef uint32_t MLuint32;
211  typedef uint32_t* MLuint32Ptr;
212  #else
213  typedef unsigned int MLuint32;
214  typedef unsigned int* MLuint32Ptr;
215  #endif
216 
217  // Cast values to avoid that they are considered as long values.
218  #define ML_UINT32_MIN (static_cast<MLuint32>(0x00000000L))
219  #define ML_UINT32_MAX (static_cast<MLuint32>(0xFFFFFFFFL))
220 
221  #define _ML_UINT32 MLuint32
223 #endif
224 
225 
226 #ifndef _ML_FLOAT
227 
229  typedef float MLfloat;
230  typedef float* MLfloatPtr;
231  #define ML_FLOAT_MIN FLT_MIN
232  #define ML_FLOAT_MAX FLT_MAX
233  #define ML_FLOAT_EPSILON FLT_EPSILON
234  // use more digits in string representation to retain full precision of binary value:
235  #define ML_FLOAT_DIG (FLT_DIG+2)
236 
237  #define _ML_FLOAT MLfloat
239 #endif
240 
241 
242 #ifndef _ML_DOUBLE
243 
245  typedef double MLdouble;
246  typedef double* MLdoublePtr;
247  #define ML_DOUBLE_MIN DBL_MIN
248  #define ML_DOUBLE_MAX DBL_MAX
249  #define ML_DOUBLE_EPSILON DBL_EPSILON
250  #define ML_DOUBLE_DIG DBL_DIG
251 
252  #define _ML_DOUBLE MLdouble
254 #endif
255 
256 
257 #ifndef _ML_LDOUBLE
258 
260  typedef long double MLldouble;
261  typedef long double* MLldoublePtr;
262  #define ML_LDOUBLE_MIN LDBL_MIN
263  #define ML_LDOUBLE_MAX LDBL_MAX
264  #define ML_LDOUBLE_EPSILON LDBL_EPSILON
265  #define ML_LDOUBLE_DIG LDBL_DIG
266 
267  #define _ML_LDOUBLE MLldouble
269 #endif
270 
271 //--------------------------------------------------------------------------------------------------
274 //--------------------------------------------------------------------------------------------------
275 #define ML_NUM_STANDARD_TYPES 10
276 
277 //--------------------------------------------------------------------------------------------------
280 //--------------------------------------------------------------------------------------------------
281 #define ML_MAX_COMPONENTS_EXTENDED_TYPE 512
282 
283 //--------------------------------------------------------------------------------------------------
285 
286 //--------------------------------------------------------------------------------------------------
288 #define ML_LUMINANCE "LUMINANCE"
289 #define ML_NEGATIVE "NEGATIVE"
291 #define ML_PALETTE "PALETTE"
293 
294 // Codes for multiple channel images.
295 
297 #define ML_RED "RED"
298 #define ML_GREEN "GREEN"
300 #define ML_BLUE "BLUE"
302 #define ML_ALPHA "ALPHA"
304 
306 #define ML_CYAN "CYAN"
307 #define ML_MAGENTA "MAGENTA"
309 #define ML_YELLOW "YELLOW"
311 #define ML_BLACK "BLACK"
313 
315 #define ML_HUE "HUE"
316 #define ML_SATURATION "SATURATION"
318 #define ML_VALUE "VALUE"
320 #define ML_LIGHTNESS "LIGHTNESS"
322 
324 #define ML_YIQ_Y "YIQ_Y"
325 #define ML_YIQ_I "YIQ_I"
327 #define ML_YIQ_Q "YIQ_Q"
329 
333 #define ML_CIE_X "CIE_X"
334 #define ML_CIE_Y "CIE_Y"
336 #define ML_CIE_Z "CIE_Z"
338 #define ML_LUV_L "LUV_L"
340 #define ML_LUV_U "LUV_U"
342 #define ML_LUV_V "LUV_V"
344 
346 #define ML_UNKNOWN "UNKNOWN"
347 
349 
350 
351 //--------------------------------------------------------------------------------------------------
353 
354 //--------------------------------------------------------------------------------------------------
356 #define ML_REAL "REAL_PART"
357 #define ML_IMAG "IMAG_PART"
359 
361 #define ML_V0 "V0"
362 #define ML_V1 "V1"
364 #define ML_V2 "V2"
366 #define ML_V3 "V3"
368 #define ML_V4 "V4"
370 #define ML_V5 "V5"
372 
374 #define ML_MAGNITUDE "MAGNITUDE"
375 #define ML_ANGLE "ANGLE"
377 
378 
379 
380 
381 //------------------------------------------------------------------------------------
382 //
384 
385 //
386 //------------------------------------------------------------------------------------
387 #ifndef ML_MIN
388  #define ML_MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
391 #endif
392 
393 #ifndef ML_MAX
394  #define ML_MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
397 #endif
398 
399 #ifndef ML_ABS
400  #define ML_ABS(X) (((X) < (0)) ? ((X) * (-1)) : (X))
403 #endif
404 
406 #ifndef ML_QUOTE
407  #define ML_QUOTE(A) #A
409 #endif
410 
412 #ifndef ML_CLAMP
413  #define ML_CLAMP(v,l,h) ((v)<(l) ? (l) : (v) > (h) ? (h) : (v))
415 #endif
416 
418 #ifndef ML_LERP
419  #define ML_LERP(a,l,h) ((l)+(((h)-(l))*(a)))
421 #endif
422 
424 
426 #ifndef ML_M_PI
427 # define ML_M_PI 3.14159265358979323846 /* pi */
428 #endif
429 #ifndef ML_M_PI_2
431 # define ML_M_PI_2 1.57079632679489661923 /* pi/2 */
432 #endif
433 
434 //---------------------------------------------------------------------------------------------
435 //
436 //
437 // 64 BIT SUPPORT
438 //
439 //
440 //---------------------------------------------------------------------------------------------
441 
442 //------------------------------------------------------------------------------------
444 
445 //------------------------------------------------------------------------------------
446 #ifndef ML_SYSTEM_HAS_NO_64
447 
449  #ifdef WIN32
450  #include "mlSystemWarningsDisable.h"
451  #include <basetsd.h>
452  #include "mlSystemWarningsRestore.h"
453  #else
454  #ifndef __STDC_LIMIT_MACROS
456  #define __STDC_LIMIT_MACROS
457  #endif
458 
459  #include "mlSystemWarningsDisable.h"
460  #include "mlSystemWarningsRestore.h"
461  #include <cstdint>
462 
463  #if !defined(INT64_MIN)
464  #error "mlTypeDefs.h must be included first or the macro __STDC_LIMIT_MACROS must be defined!"
465  #endif
466 
467  #endif
468 
469 
470  // Defines MLint64 type and its corresponding pointer type.
471  #if defined(WIN32)
472 
474  typedef INT64 MLint64;
476  typedef INT64* MLint64Ptr;
477 
479  #ifndef INT64_MIN
480  #define INT64_MIN 0x8000000000000000I64
481  #endif
482  #ifndef INT64_MAX
483  #define INT64_MAX 0x7FFFFFFFFFFFFFFFI64
484  #endif
485 
487  typedef UINT64 MLuint64;
489  typedef UINT64* MLuint64Ptr;
490 
492  #ifndef UINT64_MIN
493  #define UINT64_MIN static_cast<MLuint64>(0)
494  #endif
495  #ifndef UINT64_MAX
496  #define UINT64_MAX 0xFFFFFFFFFFFFFFFFUI64
497  #endif
498 
499  #else
500 
501  #if !defined(MEVIS_64BIT)
502  typedef int64_t MLint64;
505  typedef int64_t* MLint64Ptr;
506 
508  typedef uint64_t MLuint64;
510  typedef uint64_t* MLuint64Ptr;
511  #else
512  typedef long long MLint64;
515  typedef MLint64* MLint64Ptr;
516 
518  typedef unsigned long long MLuint64;
520  typedef MLuint64* MLuint64Ptr;
521  #endif
522  #endif
523 
524 
525 #else
526 
528 
529  typedef unsigned char MLint64[8];
530  typedef MLint64* MLint64Ptr;
531  typedef unsigned char MLuint64[8];
532  typedef MLuint64* MLuint64Ptr;
534 
535 #endif
536 
537 
538 #ifndef _ML_INT64
539 
541  #define ML_INT64_MIN INT64_MIN
542  #define ML_INT64_MAX INT64_MAX
543 
544  #define _ML_INT64 MLint64
546 #endif
547 
548 #ifndef _ML_UINT64
549 
551  #define ML_UINT64_MIN static_cast<MLuint64>(0)
552  #define ML_UINT64_MAX UINT64_MAX
553 
554  #define _ML_UINT64 MLuint64
556 #endif
557 
558 #ifdef ML_DEPRECATED
559  #ifndef ML_IS_64_BIT_SYSTEM
560  #define ML_USE_64_BIT_ADRESSES
562  #endif
563  #if defined(WIN32) && defined(ML_WARN_DEPRECATED)
564  #pragma deprecated("ML_USE_64_BIT_ADRESSES")
565  #endif
566 #endif
567 
568 
569 //--------------------------------------------------------------------------------------------
571 
572 //--------------------------------------------------------------------------------------------
573 
576 typedef MLint64 MLint;
577 
579 typedef MLint64* MLintPtr;
580 
582 #define ML_INT_MIN ML_INT64_MIN
583 
585 #define ML_INT_MAX ML_INT64_MAX
586 
587 
592 typedef MLuint64 MLuint;
593 
596 
598 #define ML_UINT_MIN UINT64_MIN
599 
601 #define ML_UINT_MAX UINT64_MAX
602 
603 
604 
605 
606 
607 //-------------------------------------------------------------------------------------
609 
610 // Introduce signed and unsigned size and offset types for pointers which are 32 bit
611 // on 32 bit systems and 64 bit on 64 bit systems. This is necessary, because integer
612 // is not large enough on 64 bit systems, because it remains 32 bit even on many 64 bit
613 // platforms.
614 // Notes:
615 // - size types should be used for memory, file, array and object sizes.
616 // - offset types should be used as offsets typically added to pointers.
617 //-------------------------------------------------------------------------------------
618 #ifndef _ML_USIZE_T
619  #define _ML_USIZE_T
621 
622  #if defined(ML_IS_64_BIT_SYSTEM)
623  typedef MLuint64 MLuoffset;
625  #else
626  typedef unsigned int MLuoffset;
628  #endif
629 
631  typedef size_t MLusize_t;
632 
634  #define ML_USIZE_T_MIN ( static_cast<size_t>(0))
635 
637  #define ML_USIZE_T_MAX (~static_cast<size_t>(0))
638 
640  #define ML_SIZE_T_MIN ML_USIZE_T_MIN
641 
643  #define ML_SIZE_T_MAX ML_USIZE_T_MAX
644 
645 #endif
646 
647 
648 #ifndef _ML_SIZE_T
649  #define _ML_SIZE_T
651 
652  #if defined(ML_IS_64_BIT_SYSTEM)
653  typedef MLint MLsoffset;
655  #else
656  typedef int MLsoffset;
658  #endif
659 
660  #if defined(WIN32)
661  typedef SSIZE_T MLssize_t;
663  #else
664  typedef ssize_t MLssize_t;
666  #endif
667 
669  #define ML_SSIZE_T_MIN (static_cast<MLssize_t>(1) << (sizeof(MLssize_t)*8-1))
670 
672  // Take the
673  #define ML_SSIZE_T_MAX (static_cast<MLssize_t>(ML_USIZE_T_MAX ^ ML_SSIZE_T_MIN))
674 #endif
675 
677 
678 
679 
680 //---------------------------------------------------------------------------------------------
681 //
682 //
683 // TYPEDEFS, MOSTLY ENUMS
684 //
685 //
686 //---------------------------------------------------------------------------------------------
687 
688 //--------------------------------------------------------------------------------------------------
691 //--------------------------------------------------------------------------------------------------
693 
694 
695 #ifdef ML_DEPRECATED
696 //--------------------------------------------------------------------------------------------------
699 //--------------------------------------------------------------------------------------------------
701 
702 #if defined(WIN32) && defined(ML_WARN_DEPRECATED)
703 #pragma deprecated("MLPhysicalDataType")
704 #endif
705 
706 #endif // ML_DEPRECATED
707 
708 //--------------------------------------------------------------------------------------------------
710 //--------------------------------------------------------------------------------------------------
711 #define ML_UNDEFINED_THREADID 0
712 
713 #ifdef WIN32
715 #else
716 typedef pthread_t MLThreadId;
717 #endif
718 
719 //--------------------------------------------------------------------------------------------------
722 //--------------------------------------------------------------------------------------------------
723 #define ML_INVALID_DATA_TYPE -1
724 
725 //--------------------------------------------------------------------------------------------------
728 //--------------------------------------------------------------------------------------------------
729 typedef enum {
740 
741  // Type IDs for extended data types:
743 
745 
758 
764 
777 
778  // this type is more or less deprecated
780 
781 } MLDataTypeIds;
782 
783 //--------------------------------------------------------------------------------------------------
785 //--------------------------------------------------------------------------------------------------
786 typedef enum { ML_RETURN_NULL = 0x0,
791 
792 
793 //--------------------------------------------------------------------------------------------------
795 //--------------------------------------------------------------------------------------------------
796 typedef enum { ML_FINAL_RUNTIME_CHECK_BIT = 0x1,
797  // Todo if memory manager knows how much memory is freed/allocated on reallocs:
798  //ML_FINAL_MEMORY_CHECK_BIT = 0x2, //!< Final checks in the Memory class are activated.
801 } MLCheckBits;
802 
803 //--------------------------------------------------------------------------------------------------
805 //--------------------------------------------------------------------------------------------------
806 typedef enum { ML_WARNING = 0x01,
807  ML_ERROR = 0x02,
808  ML_FATAL = 0x04,
809  ML_DEBUG = 0x08,
810  ML_COUT = 0x10,
811  ML_CERR = 0x20,
814 
816 
817 
818 //-----------------------------------------------------------------------------------
824 
827 
828 // Note: Be sure to cast them all to the correct MLErrorCode type.
829 
831 #define ML_INVALID_ERROR_CODE static_cast<MLErrorCode>(-1)
832 
834 #define ML_RESULT_OK static_cast<MLErrorCode>( 0)
835 
840 #define ML_UNKNOWN_EXCEPTION static_cast<MLErrorCode>( 1)
841 
845 #define ML_NO_MEMORY static_cast<MLErrorCode>( 2)
846 
848 #define ML_DISCONNECTED_GRAPH static_cast<MLErrorCode>( 3)
849 
852 #define ML_CYCLIC_GRAPH static_cast<MLErrorCode>( 4)
853 
855 #define ML_BAD_OPERATOR_POINTER static_cast<MLErrorCode>( 5)
856 
858 #define ML_BAD_OPERATOR_OUTPUT_INDEX static_cast<MLErrorCode>( 6)
859 
861 #define ML_BAD_FIELD static_cast<MLErrorCode>( 7)
862 
867 #define ML_IMAGE_DATA_CALCULATION_FAILED static_cast<MLErrorCode>( 8)
868 
870 #define ML_NO_IMAGE_INPUT_EXTENSION static_cast<MLErrorCode>( 9)
871 
878 #define ML_NO_IMAGE_PROPS static_cast<MLErrorCode>(10)
879 
881 #define ML_BAD_OPERATOR_INPUT_INDEX static_cast<MLErrorCode>(11)
882 
886 #define ML_BAD_INPUT_IMAGE_POINTER static_cast<MLErrorCode>(12)
887 
892 #define ML_BAD_DATA_TYPE static_cast<MLErrorCode>(13)
893 
898 #define ML_PROGRAMMING_ERROR static_cast<MLErrorCode>(14)
899 
905 #define ML_EMPTY_MESSAGE static_cast<MLErrorCode>(15)
906 
913 #define ML_PAGE_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(16)
914 
919 #define ML_PROPERTY_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(17)
920 
926 #define ML_INBOX_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(18)
927 
933 #define ML_BAD_PARAMETER static_cast<MLErrorCode>(19)
934 
942 #define ML_CALCULATION_ERROR static_cast<MLErrorCode>(20)
943 
945 #define ML_BAD_DIMENSION static_cast<MLErrorCode>(21)
946 
959 #define ML_RECURSION_ERROR static_cast<MLErrorCode>(22)
960 
966 #define ML_LIBRARY_LOAD_ERROR static_cast<MLErrorCode>(23)
967 
970 #define ML_FILE_IO_ERROR static_cast<MLErrorCode>(24)
971 
974 #define ML_AFTER_EFFECT static_cast<MLErrorCode>(25)
975 
978 #define ML_BAD_INDEX static_cast<MLErrorCode>(26)
979 
982 #define ML_OUT_OF_RANGE static_cast<MLErrorCode>(27)
983 
987 #define ML_MISSING_VOXEL_TYPE_OPERATIONS static_cast<MLErrorCode>(28)
988 
991 #define ML_BAD_FIELD_TYPE static_cast<MLErrorCode>(29)
992 
994 #define ML_BAD_FIELD_POINTER_OR_NO_MEMORY static_cast<MLErrorCode>(30)
995 
999 #define ML_FIELD_CREATION_ERROR_OR_NO_MEMORY static_cast<MLErrorCode>(31)
1000 
1002 #define ML_TYPE_INITIALIZATION_ERROR static_cast<MLErrorCode>(32)
1003 
1005 #define ML_CONSTRUCTOR_EXCEPTION static_cast<MLErrorCode>(33)
1006 
1009 #define ML_DESTRUCTOR_EXCEPTION static_cast<MLErrorCode>(34)
1010 
1012 #define ML_TABLE_FULL static_cast<MLErrorCode>(35)
1013 
1016 #define ML_EXTERNAL_ERROR static_cast<MLErrorCode>(36)
1017 
1020 #define ML_BAD_BASE_FIELD static_cast<MLErrorCode>(37)
1021 
1024 #define ML_BAD_BASE_FIELD_CONTENT static_cast<MLErrorCode>(38)
1025 
1031 #define ML_TYPE_NOT_REGISTERED static_cast<MLErrorCode>(39)
1032 
1038 #define ML_LIBRARY_INIT_ERROR static_cast<MLErrorCode>(40)
1039 
1043 #define ML_BAD_POINTER_OR_0 static_cast<MLErrorCode>(41)
1044 
1048 #define ML_BAD_STATE static_cast<MLErrorCode>(42)
1049 
1051 #define ML_TOO_MANY_PUSHES_OR_ADDS static_cast<MLErrorCode>(43)
1052 
1054 #define ML_TOO_MANY_POPS_OR_REMOVES static_cast<MLErrorCode>(44)
1055 
1057 #define ML_STACK_TABLE_OR_BUFFER_EMPTY static_cast<MLErrorCode>(45)
1058 
1060 #define ML_STACK_TABLE_OR_BUFFER_NOT_EMPTY static_cast<MLErrorCode>(46)
1061 
1063 #define ML_ELEMENT_NOT_FOUND static_cast<MLErrorCode>(47)
1064 
1067 #define ML_INVALID_FILE_NAME static_cast<MLErrorCode>(48)
1068 
1070 #define ML_INVALID_FILE_DESCRIPTOR static_cast<MLErrorCode>(49)
1071 
1073 #define ML_FILE_NOT_OPEN static_cast<MLErrorCode>(50)
1074 
1078 #define ML_NO_OR_INVALID_PERMISSIONS static_cast<MLErrorCode>(51)
1079 
1082 #define ML_DISK_OR_RESSOURCE_FULL static_cast<MLErrorCode>(52)
1083 
1089 #define ML_FILE_OR_DATA_STRUCTURE_CORRUPTED static_cast<MLErrorCode>(53)
1090 
1093 #define ML_INVALID_VERSION static_cast<MLErrorCode>(54)
1094 
1100 #define ML_UNKNOWN_OR_INVALID_COMPRESSION_SCHEME static_cast<MLErrorCode>(55)
1101 
1107 #define ML_TYPE_ALREADY_REGISTERED static_cast<MLErrorCode>(56)
1108 
1111 #define ML_TYPE_IS_ABSTRACT static_cast<MLErrorCode>(57)
1112 
1115 #define ML_TYPE_NOT_DERIVED_FROM_EXPECTED_PARENT_CLASS static_cast<MLErrorCode>(58)
1116 
1118 #define ML_OPERATION_INTERRUPTED static_cast<MLErrorCode>(59)
1119 
1122 #define ML_BAD_PAGE_ID static_cast<MLErrorCode>(60)
1123 
1127 #define ML_OUT_OF_RESSOURCES static_cast<MLErrorCode>(61)
1128 
1130 #define ML_OBJECT_OR_FILE_EXISTS static_cast<MLErrorCode>(62)
1131 
1133 #define ML_OBJECT_OR_FILE_DOES_NOT_EXIST static_cast<MLErrorCode>(63)
1134 
1136 #define ML_DEADLOCK_WOULD_OCCURR static_cast<MLErrorCode>(64)
1137 
1141 #define ML_COULD_NOT_OPEN_FILE static_cast<MLErrorCode>(65)
1142 
1145 #define ML_COULD_NOT_CREATE_OPEN_OR_MODIFY_FILE ML_COULD_NOT_OPEN_FILE
1146 
1148 #define ML_LIBRARY_UNLOAD_ERROR static_cast<MLErrorCode>(66)
1149 
1151 #define ML_LIBRARY_UNLOAD_EXCEPTION static_cast<MLErrorCode>(67)
1152 
1154 #define ML_NOT_SUPPORTED_ON_THIS_SYSTEM static_cast<MLErrorCode>(68)
1155 
1157 #define ML_OBJECT_STILL_REFERENCED static_cast<MLErrorCode>(69)
1158 
1160 #define ML_REQUEST_OUTSIDE_OF_IMAGE static_cast<MLErrorCode>(70)
1161 
1163 #define MLNumDefaultErrorCodes static_cast<MLErrorCode>(71)
1164 
1165 
1166 //--------------------------------------------------------------------------------------------------
1168 //--------------------------------------------------------------------------------------------------
1170 typedef enum { ML_CONTINUE= 0,
1172  ML_EXIT0,
1176 } MLTerminator;
1177 
1178 
1179 //--------------------------------------------------------------------------------------------------
1181 
1182 //--------------------------------------------------------------------------------------------------
1184 typedef enum { ML_NOTIFY_NO_OBJECT = 0x00000000,
1185  ML_NOTIFY_ERROR_OUTPUT = 0x00010000,
1186  ML_NOTIFY_API = 0x00020000,
1187  ML_NOTIFY_RUNTIME = 0x00040000,
1188  ML_NOTIFY_CACHE = 0x00080000,
1189  ML_NOTIFY_HOST = 0x00100000,
1190  ML_NOTIFY_MODULE = 0x00200000,
1191 
1192 #ifdef ML_DEPRECATED
1196 #endif // ML_DEPRECATED
1197 
1198 
1201 
1209 
1216 
1219 
1222 
1228 
1233 
1237 #ifdef ML_DEPRECATED
1240 #endif // ML_DEPRECATED
1241 
1242 
1243 
1246 
1247 
1248 
1249 //--------------------------------------------------------------------------------------------------
1252 //--------------------------------------------------------------------------------------------------
1253 typedef enum {
1257 
1258 
1259 //--------------------------------------------------------------------------------------------------
1261 //--------------------------------------------------------------------------------------------------
1262 typedef enum {
1266 } MLSign;
1267 
1268 
1270 typedef enum {
1271  ML_VX = 0,
1272  ML_VY = 1,
1273  ML_VZ = 2,
1274  ML_VW = 3,
1275  ML_VC = 3,
1276  ML_VT = 4,
1277  ML_VU = 5
1278 } MLArrayIndex;
1279 
1280 
1281 //---------------------------------------------------------------------------------------------
1282 //
1283 //
1284 // FUNCTION TYPEDEFS
1285 //
1286 //
1287 //---------------------------------------------------------------------------------------------
1288 
1290 typedef double (*MLDblFuncPtr)(double);
1291 
1292 
1293 //-----------------------------------------------------------------------------------
1295 //-----------------------------------------------------------------------------------
1297 typedef void MLMessageCB(void* usrData,
1298  MLErrorCode errCode,
1299  MLMessageType messageType,
1300  const char* messStr,
1301  int line,
1302  const char** infos);
1303 
1304 
1305 //---------------------------------------------------------------------------------------------
1314 //---------------------------------------------------------------------------------------------
1315 typedef void MLNotifyCB(MLuint32 objType,
1316  void* usrData,
1317  void* objectData1, void* objData2);
1318 
1319 //--------------------------------------------------------------------------------------------------
1321 
1322 //--------------------------------------------------------------------------------------------------
1323 typedef void MLSensorCB (void* usrData, void* sensor);
1324 typedef void MLHostProgressCB (void* usrData, const char* info1, const char* info2);
1325 typedef MLint32 MLHostBreakCheckCB (void* usrData, void** hitField);
1326 typedef void MLRequestProgressCB(void* usrData, double progress);
1328 
1329 
1330 //-----------------------------------------------------------------------------------
1331 //
1333 
1334 //
1335 //-----------------------------------------------------------------------------------
1336 
1339 typedef const char* MLApplicationGetStringPropertyCB(void* applicationUsrData, const char* propertyName, MLint16* found);
1340 
1342 typedef MLint32 MLApplicationGetInt32PropertyCB (void* applicationUsrData, const char* propertyName, MLint16* found);
1343 
1345 typedef double MLApplicationGetDoublePropertyCB(void* applicationUsrData, const char* propertyName, MLint16* found);
1346 
1349 typedef MLint32 MLApplicationGetBoolPropertyCB (void* applicationUsrData, const char* propertyName, MLint16* found);
1350 
1351 
1352 //--------------------------------------------------------------------------------------------------
1359 //--------------------------------------------------------------------------------------------------
1360 typedef MLint32 MLEventFilterCB (void* usrData, void* event);
1361 
1362 
1363 //--------------------------------------------------------------------------------------------------
1365 //--------------------------------------------------------------------------------------------------
1366 typedef struct
1367 {
1370 
1373 
1376 
1379 
1382 
1384 
1385 
1386 //--------------------------------------------------------------------------------------------------
1396 //--------------------------------------------------------------------------------------------------
1397 typedef void MLEventFilterApplicationHookCB(void* applicationUsrData,
1399  MLEventFilterCB* cb,
1400  void * usrData,
1401  MLuint32 fromMessageId,
1402  MLuint32 toMessageId);
1403 
1404 
1405 
1406 
1407 
1408 //---------------------------------------------------------------------------------------------
1409 //
1410 //
1411 // REGISTERED TYPE SUPPORT
1412 //
1413 //
1414 //---------------------------------------------------------------------------------------------
1415 
1416 //--------------------------------------------------------------------------------------------------
1418 //--------------------------------------------------------------------------------------------------
1420 
1421 #ifdef ML_DEPRECATED
1422 //--------------------------------------------------------------------------------------------------
1424 //--------------------------------------------------------------------------------------------------
1439 #endif // ML_DEPRECATED
1440 
1441 //--------------------------------------------------------------------------------------------------
1443 //--------------------------------------------------------------------------------------------------
1444 typedef unsigned char MLTypeData;
1445 
1446 //--------------------------------------------------------------------------------------------------
1448 //--------------------------------------------------------------------------------------------------
1450 
1451 //--------------------------------------------------------------------------------------------------
1454 //--------------------------------------------------------------------------------------------------
1455 typedef MLint32 MLTypeGroup;
1456 
1457 //--------------------------------------------------------------------------------------------------
1459 //--------------------------------------------------------------------------------------------------
1460 typedef enum {
1465 } MLTypeGroupIds;
1466 
1467 //--------------------------------------------------------------------------------------------------
1473 //--------------------------------------------------------------------------------------------------
1474 struct MLTypeInfos {
1475 
1477 
1478 
1480 #ifdef ML_DEPRECATED
1481  union {
1483  size_t numComps;
1484  };
1485 #else
1486  size_t numComponents;
1487 #endif
1488 
1490  size_t typeSize;
1491 
1493  const char* name;
1494 
1497 
1500 
1503 
1506 
1509 
1512 
1515 
1517  const char** goodCastTos;
1518 
1520 #ifdef ML_DEPRECATED
1521  union {
1524  };
1525 #else
1527 #endif
1528 
1543  const char* structInfoString;
1544 
1547 
1550 
1554 
1555  //--------------------------------------------------------------------------------------------------
1557 
1558  //--------------------------------------------------------------------------------------------------
1559  typedef void (*Function_SetTo ) (MLTypeData* dest);
1560  typedef bool (*Function_CastToBool ) (const MLTypeData* p);
1561  typedef MLint (*Function_CastToInt ) (const MLTypeData* p);
1563  typedef char* (*Function_GetStringValue ) (const MLTypeData* p);
1564  typedef void (*Function_CastFromInt ) (MLint value, MLTypeData* result);
1565  typedef void (*Function_CastFromDouble ) (MLdouble value, MLTypeData* result);
1566  typedef void (*Function_SetStringValue ) (const char* str, MLTypeData* result);
1567  typedef void (*Function_CopyValue ) (const MLTypeData* source, MLTypeData* dest);
1568  typedef bool (*Function_IsEqualToType ) (const MLTypeData* source1, const MLTypeData* source2);
1569  typedef bool (*Function_IsEqualToTypeWithEpsilon ) (const MLTypeData* source1, const MLTypeData* source2, MLdouble epsilon);
1570  typedef void (*Function_ApplyIntOperation ) (const MLTypeData* source, MLint value, MLTypeData* result);
1571  typedef void (*Function_ApplyDoubleOperation ) (const MLTypeData* source, MLdouble value, MLTypeData* result);
1572  typedef void (*Function_ApplyOperation ) (const MLTypeData* source1, const MLTypeData* source2, MLTypeData* result);
1573  typedef void (*Function_CastToOtherType ) (const MLTypeData* myData, const MLTypeInfos* otherInfos, MLTypeData* otherData);
1574  typedef void (*Function_CastFromOtherType ) (const MLTypeInfos* myInfos, const MLTypeData* myData, MLTypeData* otherData);
1575  typedef void (*Function_MultWithOtherType ) (const MLTypeInfos* myInfos, const MLTypeData* myData, const MLTypeData* otherData, MLTypeData* result);
1576  typedef void (*Function_ArrayCopy ) (const MLTypeData* source, MLTypeData* dest, size_t size);
1577  typedef void (*Function_ArrayFill ) (const MLTypeData* fillValue, MLTypeData* dest, size_t size);
1578  typedef void (*Function_ArrayCopyWithStrides ) (const MLTypeData* source, MLssize_t sourceStride, MLTypeData* dest, MLssize_t destStride, size_t size);
1579  typedef void (*Function_Interpolate ) (const MLTypeData* source1, const MLTypeData* source2, MLdouble alpha, MLTypeData* result);
1580  typedef void (*Function_ArrayRescale ) (const MLTypeData* source, MLdouble scaleFactor, const MLTypeData* offset, MLTypeData* dest, size_t size);
1581  typedef bool (*Function_ArrayEqualsValue ) (const MLTypeData* value, const MLTypeData* buffer, size_t size);
1582  typedef void (*Function_ArrayGetMinMax ) (const MLTypeData* source, size_t size, MLdouble& min, MLdouble& max);
1583  typedef MLdouble (*Function_GetComponent ) (const MLTypeData* source, size_t componentIndex);
1584  typedef void (*Function_SetComponent ) (MLTypeData* dest, size_t componentIndex, MLdouble value);
1586 
1588 
1589 
1597 
1616 
1625 
1632 
1635 
1638 
1643 
1648 
1653 
1658 
1663 
1672 
1680 };
1681 
1682 
1683 
1684 //--------------------------------------------------------------------------------------------------
1688 //--------------------------------------------------------------------------------------------------
1689 #define ML_CALC_FTYPE MLdouble
1690 
1691 //--------------------------------------------------------------------------------------------------
1695 //--------------------------------------------------------------------------------------------------
1696 #define ML_CALC_ITYPE MLint
1697 
1698 
1699 //--------------------------------------------------------------------------------------------------
1701 
1702 //--------------------------------------------------------------------------------------------------
1703 #define ML_TYPE_ASSIGN_FUNCTION_POINTERS() \
1704  getStringValue = MLTYPE_getStringValue; \
1705  setStringValue = MLTYPE_setStringValue; \
1706  setToMinimum = MLTYPE_setToMinimum; \
1707  setToMaximum = MLTYPE_setToMaximum; \
1708  setToDefault = MLTYPE_setToDefault; \
1709  getComponent = MLTYPE_getComponent; \
1710  setComponent = MLTYPE_setComponent; \
1711  copy = MLTYPE_copy; \
1712  arrayCopy = MLTYPE_arrayCopy; \
1713  arrayCopyWithStrides = MLTYPE_arrayCopyWithStrides; \
1714  arrayFill = MLTYPE_arrayFill; \
1715  \
1716  castToBool = MLTYPE_castToBool; \
1717  castToInt = MLTYPE_castToInt; \
1718  castToDouble = MLTYPE_castToDouble; \
1719  castToOtherType = MLTYPE_castToOtherType; \
1720  castFromInt = MLTYPE_castFromInt; \
1721  castFromDouble = MLTYPE_castFromDouble; \
1722  castFromOtherType = MLTYPE_castFromOtherType; \
1723  \
1724  isEqualToType = MLTYPE_isEqualToType; \
1725  isEqualToTypeWithEpsilon= MLTYPE_isEqualToTypeWithEpsilon;\
1726  \
1727  negate = MLTYPE_negate; \
1728  normalize = MLTYPE_normalize; \
1729  \
1730  arrayRescale = MLTYPE_arrayRescale; \
1731  interpolate = MLTYPE_interpolate; \
1732  arrayEqualsValue = MLTYPE_arrayEqualsValue; \
1733  arrayGetMinMax = MLTYPE_arrayGetMinMax; \
1734  \
1735  multWithInt = MLTYPE_multWithInt; \
1736  multWithDouble = MLTYPE_multWithDouble; \
1737  multWithType = MLTYPE_multWithType; \
1738  multWithOtherType = MLTYPE_multWithOtherType; \
1739  \
1740  plusInt = MLTYPE_plusInt; \
1741  plusDouble = MLTYPE_plusDouble; \
1742  plusType = MLTYPE_plusType;
1743 
1744 
1745 
1746 #endif // __mlTypeDefs_H
1747 
1748 
1749 
Function_ApplyOperation multWithType
Implements multiplication with its own type. Result written into parameter three. ...
Definition: mlTypeDefs.h:1669
size_t numComponents
Definition: mlTypeDefs.h:1482
size_t compOffsets[ML_MAX_COMPONENTS_EXTENDED_TYPE]
Definition: mlTypeDefs.h:1523
MLuint64 MLCTUInt
Definition: mlTypeDefs.h:1437
MLint32 MLApplicationGetInt32PropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get an int value property with the propertyName f...
Definition: mlTypeDefs.h:1342
MLint32 MLDataType
MLDataType.
Definition: mlTypeDefs.h:692
MLTypePropertyBits MLTypePropBits
Definition: mlTypeDefs.h:1428
MLApplicationGetBoolPropertyCB * _getBoolCB
Callback to be set by an application to return a Boolean property.
Definition: mlTypeDefs.h:1378
const MLTypeData * typeDefaultPtr
Data type default specified by derived class.
Definition: mlTypeDefs.h:1511
const MLTypeData * typeMinPtr
Data type minimum specified by derived class.
Definition: mlTypeDefs.h:1505
Function_ApplyIntOperation multWithInt
Implements multiplication with integer. Result written into parameter three.
Definition: mlTypeDefs.h:1665
Array index for x components (entry 0)
Definition: mlTypeDefs.h:1271
On allocation failure a fatal error is posted and ML_NO_MEMORY is thrown.
Definition: mlTypeDefs.h:789
Structure containing all data type features and pointers to all functions needed to implement operati...
Definition: mlTypeDefs.h:1474
signed int MLint32
Definition: mlTypeDefs.h:189
void MLRequestProgressCB(void *usrData, double progress)
Definition: mlTypeDefs.h:1326
bool(* Function_CastToBool)(const MLTypeData *p)
Definition: mlTypeDefs.h:1560
Terminates the application with exit(0), not recommended for use in normal code.
Definition: mlTypeDefs.h:1173
On allocation failure a throw(ML_NO_MEMORY) is executed.
Definition: mlTypeDefs.h:788
unsigned short MLuint16
Definition: mlTypeDefs.h:170
Array index for t (time) components (entry 4)
Definition: mlTypeDefs.h:1276
Function_ArrayCopy arrayCopy
Copies number of elements at first parameter to second one.
Definition: mlTypeDefs.h:1611
0x0000 = No object
Definition: mlTypeDefs.h:1184
All available checks are activated.
Definition: mlTypeDefs.h:800
Function_CastFromDouble castFromDouble
Casts the first (the double) parameter to the data type and returns it into second parameter...
Definition: mlTypeDefs.h:1629
signed short MLint16
Definition: mlTypeDefs.h:153
const MLTypeData * typeMaxPtr
Data type maximum specified by derived class.
Definition: mlTypeDefs.h:1508
Array index for y components (entry 1)
Definition: mlTypeDefs.h:1272
Function_ApplyDoubleOperation plusDouble
Implements double addition to parameter one. Result written into parameter three. ...
Definition: mlTypeDefs.h:1676
unsigned char * MLuint8Ptr
Definition: mlTypeDefs.h:138
UINT64 MLuint64
Introduce platform independent 64 bit unsigned integer type.
Definition: mlTypeDefs.h:487
int MLsoffset
Signed ML offset type which is a 32 bit signed integer on 32 bit platforms and a 64 bit integer on 64...
Definition: mlTypeDefs.h:657
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
Definition: mlTypeDefs.h:592
Function_SetTo setToMaximum
Sets value to minimum value. Must be implemented.
Definition: mlTypeDefs.h:1601
MLApplicationGetInt32PropertyCB * _getInt32CB
Callback to be set by an application to return a int32 property.
Definition: mlTypeDefs.h:1372
MLTypeGroup typeGroup
Type group to which this type belongs.
Definition: mlTypeDefs.h:1549
char MLint8
Definition: mlTypeDefs.h:125
Enumerator for the signed 8 bit ML integer type.
Definition: mlTypeDefs.h:730
#define ML_DEPRECATED
Definition: mlMacros.h:40
On allocation failure NULL is returned without error handling.
Definition: mlTypeDefs.h:786
void(* Function_ArrayCopyWithStrides)(const MLTypeData *source, MLssize_t sourceStride, MLTypeData *dest, MLssize_t destStride, size_t size)
Definition: mlTypeDefs.h:1578
unsigned char MLTypeData
This is the pointer type used to point to the data of MLType data instances.
Definition: mlTypeDefs.h:1444
MLuint32 MLThreadId
Definition: mlTypeDefs.h:714
Function_CopyValue copy
Copies first parameter to second one.
Definition: mlTypeDefs.h:1609
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:1349
MLApplicationGetDoublePropertyCB * _getDoubleCB
Callback to be set by an application to return a double property.
Definition: mlTypeDefs.h:1375
0x0008 = Cache
Definition: mlTypeDefs.h:1188
bool MLCTBool
Definition: mlTypeDefs.h:1431
MLuint64 * MLuintPtr
A pointer to the unsigned ML integer type MLuint.
Definition: mlTypeDefs.h:595
MLNotifyChangedClassType
Codes for ML classes which may change:
Definition: mlTypeDefs.h:1184
Enumerator for the signed 32 bit ML integer type.
Definition: mlTypeDefs.h:734
Function_ArrayEqualsValue arrayEqualsValue
Check that the first argument equals all the values given with the second argument (and the size in t...
Definition: mlTypeDefs.h:1652
Function_SetTo setToDefault
Sets value to default value. Must be implemented.
Definition: mlTypeDefs.h:1603
Function_IsEqualToTypeWithEpsilon isEqualToTypeWithEpsilon
Returns true if both parameters are equal within a static epsilon, otherwise false.
Definition: mlTypeDefs.h:1637
MLCheckBits
Enumerator describing runtime and final checks in the ML.
Definition: mlTypeDefs.h:796
0x0001 = ErrorOutput
Definition: mlTypeDefs.h:1185
Defines all callbacks that an application has to support for property access.
Definition: mlTypeDefs.h:1366
double(* MLDblFuncPtr)(double)
A function pointer type to a function which returns a double and takes a double as argument...
Definition: mlTypeDefs.h:1290
size_t componentOffsets[ML_MAX_COMPONENTS_EXTENDED_TYPE]
Definition: mlTypeDefs.h:1522
MLNotifyChangedObjectType
Objects of the ML which call the registered functions when changed.
Definition: mlTypeDefs.h:1208
const char * name
Pointer to the data type name.
Definition: mlTypeDefs.h:1493
MLApplicationGetStringPropertyCB * _getStringCB
Callback to be set by an application to return a string property.
Definition: mlTypeDefs.h:1369
Final checks in the RuntimeType system are activated.
Definition: mlTypeDefs.h:796
bool(* Function_IsEqualToTypeWithEpsilon)(const MLTypeData *source1, const MLTypeData *source2, MLdouble epsilon)
Definition: mlTypeDefs.h:1569
Function_CastToInt castToInt
Returns a type value cast to integer.
Definition: mlTypeDefs.h:1620
void MLHostProgressCB(void *usrData, const char *info1, const char *info2)
Definition: mlTypeDefs.h:1324
Enumerator for the signed 64 bit ML floating point type.
Definition: mlTypeDefs.h:737
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:576
MLint32 MLPhysicalDataType
Definition: mlTypeDefs.h:700
void(* Function_Interpolate)(const MLTypeData *source1, const MLTypeData *source2, MLdouble alpha, MLTypeData *result)
Definition: mlTypeDefs.h:1579
void(* Function_ApplyOperation)(const MLTypeData *source1, const MLTypeData *source2, MLTypeData *result)
Definition: mlTypeDefs.h:1572
char * MLint8Ptr
Definition: mlTypeDefs.h:126
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.
0x0004 = Runtime
Definition: mlTypeDefs.h:1187
void * _applicationUsrData
Defines the user data that is supplied with all callbacks.
Definition: mlTypeDefs.h:1381
MLint32 MLHostBreakCheckCB(void *usrData, void **hitField)
Definition: mlTypeDefs.h:1325
MLint32 MLErrorCode
Type of an ML Error code.
Definition: mlTypeDefs.h:826
Function_SetComponent setComponent
Set n-th component of the type from double (applying rounding if needed)
Definition: mlTypeDefs.h:1607
size_t MLusize_t
The unsigned ML size type which is an unsigned 32 bit size_t on 32 bit platforms and 64 bit one on 64...
Definition: mlTypeDefs.h:631
Function_CastToDouble castToDouble
Returns a type value cast to double.
Definition: mlTypeDefs.h:1622
MLdouble(* Function_CastToDouble)(const MLTypeData *p)
Definition: mlTypeDefs.h:1562
MLMessageType
Message types handled by the ErrorOutput class.
Definition: mlTypeDefs.h:806
Function_CastToBool castToBool
Returns a type value cast to bool. Usually an equality to 0 should return false, e.g., a null vector.
Definition: mlTypeDefs.h:1618
Function_ApplyDoubleOperation multWithDouble
Implements multiplication with double. Result written into parameter three.
Definition: mlTypeDefs.h:1667
Function_GetComponent getComponent
Get n-th component of the type as double.
Definition: mlTypeDefs.h:1605
void(* Function_SetStringValue)(const char *str, MLTypeData *result)
Definition: mlTypeDefs.h:1566
MLSign
Definition of possible signs as enumerator.
Definition: mlTypeDefs.h:1262
Function_CopyValue normalize
Normalizes the type value from parameter 1 and write it into parameter 2.
Definition: mlTypeDefs.h:1642
bool(* Function_ArrayEqualsValue)(const MLTypeData *value, const MLTypeData *buffer, size_t size)
Definition: mlTypeDefs.h:1581
bool(* Function_IsEqualToType)(const MLTypeData *source1, const MLTypeData *source2)
Definition: mlTypeDefs.h:1568
signed int * MLint32Ptr
Definition: mlTypeDefs.h:190
Defines basic macros.
All checks are deactivated.
Definition: mlTypeDefs.h:799
void(* Function_ApplyDoubleOperation)(const MLTypeData *source, MLdouble value, MLTypeData *result)
Definition: mlTypeDefs.h:1571
Function_CastFromOtherType castFromOtherType
Casts another registered type to data.
Definition: mlTypeDefs.h:1631
MLint MLCTInt
Definition: mlTypeDefs.h:1434
Function_ArrayRescale arrayRescale
Scale the values from the first parameter with the second parameter and offset it with the value from...
Definition: mlTypeDefs.h:1647
void MLNotifyCB(MLuint32 objType, void *usrData, void *objectData1, void *objData2)
Function type which is registered by the Notify object; it receives a code objType of type MLNotifyCh...
Definition: mlTypeDefs.h:1315
MLTerminator
Termination types for error handling.
Definition: mlTypeDefs.h:1170
void(* Function_CastFromOtherType)(const MLTypeInfos *myInfos, const MLTypeData *myData, MLTypeData *otherData)
Definition: mlTypeDefs.h:1574
unsigned int MLuoffset
Unsigned ML offset type which is a 32 bit unsigned integer on 32 bit platforms and 64 bit one on 64 b...
Definition: mlTypeDefs.h:627
void(* Function_SetTo)(MLTypeData *dest)
Definition: mlTypeDefs.h:1559
Function_GetStringValue getStringValue
Returns a value as a string.
Definition: mlTypeDefs.h:1593
Function_MultWithOtherType multWithOtherType
Implements multiplication with another type. Result written into parameter three. ...
Definition: mlTypeDefs.h:1671
MLdouble dblMin
double minimum of data type if it exists.
Definition: mlTypeDefs.h:1499
Uses abort() to terminate the application which supports easily to start the debugger.
Definition: mlTypeDefs.h:1171
On allocation failure a fatal error print is done and NULL is returned.
Definition: mlTypeDefs.h:787
0x0002 = API
Definition: mlTypeDefs.h:1186
Function_ArrayCopyWithStrides arrayCopyWithStrides
Same as above, but allows to specify stride values for source and destination.
Definition: mlTypeDefs.h:1613
void(* Function_ArrayRescale)(const MLTypeData *source, MLdouble scaleFactor, const MLTypeData *offset, MLTypeData *dest, size_t size)
Definition: mlTypeDefs.h:1580
MLdouble(* Function_GetComponent)(const MLTypeData *source, size_t componentIndex)
Definition: mlTypeDefs.h:1583
void(* Function_CastFromDouble)(MLdouble value, MLTypeData *result)
Definition: mlTypeDefs.h:1565
0x0020 = Module
Definition: mlTypeDefs.h:1190
MLTypeGroupIds
Some predefined type groups.
Definition: mlTypeDefs.h:1460
Negative sign enumerator.
Definition: mlTypeDefs.h:1264
void MLEventFilterApplicationHookCB(void *applicationUsrData, MLEventFilterApplicationMessage type, MLEventFilterCB *cb, void *usrData, MLuint32 fromMessageId, MLuint32 toMessageId)
Internal application event filter callback type.
Definition: mlTypeDefs.h:1397
Function_ApplyIntOperation plusInt
Implements integer addition to parameter one. Result written into parameter three.
Definition: mlTypeDefs.h:1674
char *(* Function_GetStringValue)(const MLTypeData *p)
Definition: mlTypeDefs.h:1563
Function_Interpolate interpolate
Interpolate linearly between the first and the second parameter, at the position given by the third p...
Definition: mlTypeDefs.h:1662
const char * structInfoString
Pointer to a null-terminated string describing the type configuration.
Definition: mlTypeDefs.h:1543
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:1345
unsigned int * MLuint32Ptr
Definition: mlTypeDefs.h:214
size_t typeSize
sizeof the data type in bytes.
Definition: mlTypeDefs.h:1490
float MLfloat
Definition: mlTypeDefs.h:229
Function_ApplyOperation plusType
Implements parameter two addition to parameter one. Result written into parameter three...
Definition: mlTypeDefs.h:1678
Array index for u (unit/user dimension) components (entry 5)
Definition: mlTypeDefs.h:1277
MLDataTypeIds
MLDataType identifiers.
Definition: mlTypeDefs.h:729
INT64 MLint64
Introduce platform independent 64 bit signed integer type.
Definition: mlTypeDefs.h:474
Enumerator for the signed 16 bit ML integer type.
Definition: mlTypeDefs.h:732
Function_CastToOtherType castToOtherType
Casts data to another registered type.
Definition: mlTypeDefs.h:1624
Function_CopyValue negate
Negates the value.
Definition: mlTypeDefs.h:1640
size_t numComps
Definition: mlTypeDefs.h:1483
Array index for w (forth components of homogeneous vectors, entry 3)
Definition: mlTypeDefs.h:1274
void(* Function_ArrayCopy)(const MLTypeData *source, MLTypeData *dest, size_t size)
Definition: mlTypeDefs.h:1576
MLint64 * MLintPtr
A pointer to the signed ML integer type MLint.
Definition: mlTypeDefs.h:579
long double MLldouble
Definition: mlTypeDefs.h:260
void(* Function_ArrayGetMinMax)(const MLTypeData *source, size_t size, MLdouble &min, MLdouble &max)
Definition: mlTypeDefs.h:1582
Enumerator for the unsigned 16 bit ML integer type.
Definition: mlTypeDefs.h:733
size_t numGoodCastTos
Number of data types to which this type can be casted without information or functionality loss...
Definition: mlTypeDefs.h:1514
void(* Function_ApplyIntOperation)(const MLTypeData *source, MLint value, MLTypeData *result)
Definition: mlTypeDefs.h:1570
Enumerator for the unsigned 8 bit ML integer type.
Definition: mlTypeDefs.h:731
This file contains some global configuration switches for the ML.
Function_IsEqualToType isEqualToType
Returns true if both parameters are equal, otherwise false.
Definition: mlTypeDefs.h:1634
unsigned int MLuint32
Definition: mlTypeDefs.h:213
void MLSensorCB(void *usrData, void *sensor)
Definition: mlTypeDefs.h:1323
Function_CastFromInt castFromInt
Casts the first (the integer) parameter to the data type and returns it into second parameter...
Definition: mlTypeDefs.h:1627
Function_ArrayGetMinMax arrayGetMinMax
Get the minimum and maximum component values from the array in the first argument, and return it in the third and fourth argument, the size of the array is in the second argument.
Definition: mlTypeDefs.h:1657
long double * MLldoublePtr
Definition: mlTypeDefs.h:261
unsigned short * MLuint16Ptr
Definition: mlTypeDefs.h:171
Enumerator for the unsigned 64 bit ML integer type.
Definition: mlTypeDefs.h:739
MLint32 MLEventFilterCB(void *usrData, void *event)
Callback function type for events that are passed to the user.
Definition: mlTypeDefs.h:1360
MLDataType rangeAndPrecisionEquivalent
Standard data type which has a comparable range and precision behavior.
Definition: mlTypeDefs.h:1496
MLint32 MLTypeGroup
This is an identifier to differentiate types like matrices, vectors and complex/quaternion types...
Definition: mlTypeDefs.h:1449
const char ** goodCastTos
Data types names to which this type can be casted without information or functionality loss...
Definition: mlTypeDefs.h:1517
void(* Function_MultWithOtherType)(const MLTypeInfos *myInfos, const MLTypeData *myData, const MLTypeData *otherData, MLTypeData *result)
Definition: mlTypeDefs.h:1575
double * MLdoublePtr
Definition: mlTypeDefs.h:246
Array index for z components (entry 2)
Definition: mlTypeDefs.h:1273
#define ML_MAX_COMPONENTS_EXTENDED_TYPE
Maximum number of components for extended types.
Definition: mlTypeDefs.h:281
MLint32 dataTypeId
Real MLDataType id of under which these operations are registered as data type.
Definition: mlTypeDefs.h:1546
UINT64 * MLuint64Ptr
Introduce platform independent 64 bit unsigned integer pointer type.
Definition: mlTypeDefs.h:489
Positive sign enumerator.
Definition: mlTypeDefs.h:1265
Terminates the application with exit(ErrorCode), not recommended for use in normal code...
Definition: mlTypeDefs.h:1174
float * MLfloatPtr
Definition: mlTypeDefs.h:230
Tries to ignore the message and to continue.
Definition: mlTypeDefs.h:1170
INT64 * MLint64Ptr
Introduce platform independent 64 bit signed integer pointer type.
Definition: mlTypeDefs.h:476
Enumerator for no negative and no positive sign (=0).
Definition: mlTypeDefs.h:1263
Function_SetStringValue setStringValue
Converts string s to value and write result into r.
Definition: mlTypeDefs.h:1596
MLArrayIndex
Indexes for axes, arrays and vectors.
Definition: mlTypeDefs.h:1270
void(* Function_CastToOtherType)(const MLTypeData *myData, const MLTypeInfos *otherInfos, MLTypeData *otherData)
Definition: mlTypeDefs.h:1573
SSIZE_T MLssize_t
The signed ML size type which is a signed 32 bit size_t on 32 bit platforms and 64 bit one on 64 bit ...
Definition: mlTypeDefs.h:662
MLuint64 MLTypePropertyBits
Structure to define a bit mask which identifies all implemented functions for a data type...
Definition: mlTypeDefs.h:1419
MLTypePropertyBits propertyBits
Variable containing an enabled bit for each defined property.
Definition: mlTypeDefs.h:1552
void(* Function_ArrayFill)(const MLTypeData *fillValue, MLTypeData *dest, size_t size)
Definition: mlTypeDefs.h:1577
unsigned char MLuint8
Definition: mlTypeDefs.h:137
Enumerator for the signed 64 bit ML integer type.
Definition: mlTypeDefs.h:738
MLEventFilterApplicationMessage
Enum to describe the significance of the call, e.g., whether an &#39;add&#39; or a &#39;remove&#39; of a function is ...
Definition: mlTypeDefs.h:1253
MLint(* Function_CastToInt)(const MLTypeData *p)
Definition: mlTypeDefs.h:1561
Function_SetTo setToMinimum
Sets value to minimum value. Must be implemented.
Definition: mlTypeDefs.h:1599
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:1297
Enumerator for the unsigned 32 bit ML integer type.
Definition: mlTypeDefs.h:735
void(* Function_SetComponent)(MLTypeData *dest, size_t componentIndex, MLdouble value)
Definition: mlTypeDefs.h:1584
void(* Function_CastFromInt)(MLint value, MLTypeData *result)
Definition: mlTypeDefs.h:1564
void(* Function_CopyValue)(const MLTypeData *source, MLTypeData *dest)
Definition: mlTypeDefs.h:1567
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:1339
signed short * MLint16Ptr
Definition: mlTypeDefs.h:154
MLMemoryErrorHandling
Enumerator to specify memory error handling.
Definition: mlTypeDefs.h:786
Array index for c (color) components (entry 3)
Definition: mlTypeDefs.h:1275
Enumerator for the signed 32 bit ML floating point type.
Definition: mlTypeDefs.h:736
0x0010 = Host
Definition: mlTypeDefs.h:1189
Function_ArrayFill arrayFill
Sets first parameter to array at second one.
Definition: mlTypeDefs.h:1615
double MLdouble
Definition: mlTypeDefs.h:245
MLdouble dblMax
double maximum of data type if it exists.
Definition: mlTypeDefs.h:1502