25#include <ThirdPartyWarningsDisable.h>
32 #include <sys/types.h>
35#include <ThirdPartyWarningsRestore.h>
53 #define ML_NAMESPACE ml
56#ifndef ML_START_NAMESPACE
60 #define ML_START_NAMESPACE namespace ML_NAMESPACE {
63#ifndef ML_END_NAMESPACE
66 #define ML_END_NAMESPACE }
85#define ML_CONSTANT_PREFIX "ML_"
98 #define ML_INT8_MIN -128
99 #define ML_INT8_MAX 0x7F
102 #define _ML_INT8 MLint8
110 #define ML_UINT8_MIN 0x00
111 #define ML_UINT8_MAX 0xFF
114 #define _ML_UINT8 MLuint8
127 #define ML_INT16_MIN -32768
128 #define ML_INT16_MAX 0x7FFF
131 #define _ML_INT16 MLint16
144 #define ML_UINT16_MIN 0x0000
145 #define ML_UINT16_MAX 0xFFFF
148 #define _ML_UINT16 MLuint16
169 #define ML_INT32_MIN (static_cast<MLint32>(0x80000000L))
170 #define ML_INT32_MAX (static_cast<MLint32>(0x7FFFFFFFL))
173 #define _ML_INT32 MLint32
189 #define ML_UINT32_MIN (static_cast<MLuint32>(0x00000000L))
190 #define ML_UINT32_MAX (static_cast<MLuint32>(0xFFFFFFFFL))
193 #define _ML_UINT32 MLuint32
202 #define ML_FLOAT_MIN FLT_MIN
203 #define ML_FLOAT_MAX FLT_MAX
204 #define ML_FLOAT_EPSILON FLT_EPSILON
206 #define ML_FLOAT_DIG (FLT_DIG+2)
209 #define _ML_FLOAT MLfloat
218 #define ML_DOUBLE_MIN DBL_MIN
219 #define ML_DOUBLE_MAX DBL_MAX
220 #define ML_DOUBLE_EPSILON DBL_EPSILON
221 #define ML_DOUBLE_DIG DBL_DIG
224 #define _ML_DOUBLE MLdouble
233 #define ML_LDOUBLE_MIN LDBL_MIN
234 #define ML_LDOUBLE_MAX LDBL_MAX
235 #define ML_LDOUBLE_EPSILON LDBL_EPSILON
236 #define ML_LDOUBLE_DIG LDBL_DIG
239 #define _ML_LDOUBLE MLldouble
246#define ML_NUM_STANDARD_TYPES 10
252#define ML_MAX_COMPONENTS_EXTENDED_TYPE 512
259#define ML_LUMINANCE "LUMINANCE"
261#define ML_NEGATIVE "NEGATIVE"
263#define ML_PALETTE "PALETTE"
270#define ML_GREEN "GREEN"
272#define ML_BLUE "BLUE"
274#define ML_ALPHA "ALPHA"
277#define ML_CYAN "CYAN"
279#define ML_MAGENTA "MAGENTA"
281#define ML_YELLOW "YELLOW"
283#define ML_BLACK "BLACK"
288#define ML_SATURATION "SATURATION"
290#define ML_VALUE "VALUE"
292#define ML_LIGHTNESS "LIGHTNESS"
295#define ML_YIQ_Y "YIQ_Y"
297#define ML_YIQ_I "YIQ_I"
299#define ML_YIQ_Q "YIQ_Q"
304#define ML_CIE_X "CIE_X"
306#define ML_CIE_Y "CIE_Y"
308#define ML_CIE_Z "CIE_Z"
310#define ML_LUV_L "LUV_L"
312#define ML_LUV_U "LUV_U"
314#define ML_LUV_V "LUV_V"
317#define ML_UNKNOWN "UNKNOWN"
327#define ML_REAL "REAL_PART"
329#define ML_IMAG "IMAG_PART"
345#define ML_MAGNITUDE "MAGNITUDE"
347#define ML_ANGLE "ANGLE"
362 #define ML_QUOTE_INTERNAL(A) #A
363 #define ML_QUOTE(A) ML_QUOTE_INTERNAL(A)
369 #define ML_LERP(a,l,h) ((l)+(((h)-(l))*(a)))
376# define ML_M_PI 3.14159265358979323846
380# define ML_M_PI_2 1.57079632679489661923
395#ifndef ML_SYSTEM_HAS_NO_64
399 #include <ThirdPartyWarningsDisable.h>
401 #include <ThirdPartyWarningsRestore.h>
417 #define INT64_MIN 0x8000000000000000I64
420 #define INT64_MAX 0x7FFFFFFFFFFFFFFFI64
430 #define UINT64_MIN static_cast<MLuint64>(0)
433 #define UINT64_MAX 0xFFFFFFFFFFFFFFFFUI64
443 typedef unsigned long long MLuint64;
453 typedef unsigned char MLint64[8];
465 #define ML_INT64_MIN INT64_MIN
466 #define ML_INT64_MAX INT64_MAX
469 #define _ML_INT64 MLint64
475 #define ML_UINT64_MIN static_cast<MLuint64>(0)
476 #define ML_UINT64_MAX UINT64_MAX
479 #define _ML_UINT64 MLuint64
495#define ML_INT_MIN ML_INT64_MIN
498#define ML_INT_MAX ML_INT64_MAX
511#define ML_UINT_MIN UINT64_MIN
514#define ML_UINT_MAX UINT64_MAX
542 #define ML_USIZE_T_MIN ( static_cast<size_t>(0))
545 #define ML_USIZE_T_MAX (~static_cast<size_t>(0))
548 #define ML_SIZE_T_MIN ML_USIZE_T_MIN
551 #define ML_SIZE_T_MAX ML_USIZE_T_MAX
572 #define ML_SSIZE_T_MIN (static_cast<MLssize_t>(1) << (sizeof(MLssize_t)*8-1))
576 #define ML_SSIZE_T_MAX (static_cast<MLssize_t>(ML_USIZE_T_MAX ^ ML_SSIZE_T_MIN))
600#define ML_UNDEFINED_THREADID 0
612#define ML_INVALID_DATA_TYPE -1
720#define ML_INVALID_ERROR_CODE static_cast<MLErrorCode>(-1)
723#define ML_RESULT_OK static_cast<MLErrorCode>( 0)
729#define ML_UNKNOWN_EXCEPTION static_cast<MLErrorCode>( 1)
734#define ML_NO_MEMORY static_cast<MLErrorCode>( 2)
737#define ML_DISCONNECTED_GRAPH static_cast<MLErrorCode>( 3)
741#define ML_CYCLIC_GRAPH static_cast<MLErrorCode>( 4)
744#define ML_BAD_OPERATOR_POINTER static_cast<MLErrorCode>( 5)
747#define ML_BAD_OPERATOR_OUTPUT_INDEX static_cast<MLErrorCode>( 6)
750#define ML_BAD_FIELD static_cast<MLErrorCode>( 7)
756#define ML_IMAGE_DATA_CALCULATION_FAILED static_cast<MLErrorCode>( 8)
759#define ML_NO_IMAGE_INPUT_EXTENSION static_cast<MLErrorCode>( 9)
767#define ML_NO_IMAGE_PROPS static_cast<MLErrorCode>(10)
770#define ML_BAD_OPERATOR_INPUT_INDEX static_cast<MLErrorCode>(11)
775#define ML_BAD_INPUT_IMAGE_POINTER static_cast<MLErrorCode>(12)
781#define ML_BAD_DATA_TYPE static_cast<MLErrorCode>(13)
787#define ML_PROGRAMMING_ERROR static_cast<MLErrorCode>(14)
794#define ML_EMPTY_MESSAGE static_cast<MLErrorCode>(15)
802#define ML_PAGE_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(16)
808#define ML_PROPERTY_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(17)
815#define ML_INBOX_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(18)
822#define ML_BAD_PARAMETER static_cast<MLErrorCode>(19)
831#define ML_CALCULATION_ERROR static_cast<MLErrorCode>(20)
834#define ML_BAD_DIMENSION static_cast<MLErrorCode>(21)
848#define ML_RECURSION_ERROR static_cast<MLErrorCode>(22)
855#define ML_LIBRARY_LOAD_ERROR static_cast<MLErrorCode>(23)
859#define ML_FILE_IO_ERROR static_cast<MLErrorCode>(24)
863#define ML_AFTER_EFFECT static_cast<MLErrorCode>(25)
867#define ML_BAD_INDEX static_cast<MLErrorCode>(26)
871#define ML_OUT_OF_RANGE static_cast<MLErrorCode>(27)
876#define ML_MISSING_VOXEL_TYPE_OPERATIONS static_cast<MLErrorCode>(28)
880#define ML_BAD_FIELD_TYPE static_cast<MLErrorCode>(29)
883#define ML_BAD_FIELD_POINTER_OR_NO_MEMORY static_cast<MLErrorCode>(30)
888#define ML_FIELD_CREATION_ERROR_OR_NO_MEMORY static_cast<MLErrorCode>(31)
891#define ML_TYPE_INITIALIZATION_ERROR static_cast<MLErrorCode>(32)
894#define ML_CONSTRUCTOR_EXCEPTION static_cast<MLErrorCode>(33)
898#define ML_DESTRUCTOR_EXCEPTION static_cast<MLErrorCode>(34)
901#define ML_TABLE_FULL static_cast<MLErrorCode>(35)
905#define ML_EXTERNAL_ERROR static_cast<MLErrorCode>(36)
909#define ML_BAD_BASE_FIELD static_cast<MLErrorCode>(37)
913#define ML_BAD_BASE_FIELD_CONTENT static_cast<MLErrorCode>(38)
920#define ML_TYPE_NOT_REGISTERED static_cast<MLErrorCode>(39)
927#define ML_LIBRARY_INIT_ERROR static_cast<MLErrorCode>(40)
932#define ML_BAD_POINTER_OR_0 static_cast<MLErrorCode>(41)
937#define ML_BAD_STATE static_cast<MLErrorCode>(42)
940#define ML_TOO_MANY_PUSHES_OR_ADDS static_cast<MLErrorCode>(43)
943#define ML_TOO_MANY_POPS_OR_REMOVES static_cast<MLErrorCode>(44)
946#define ML_STACK_TABLE_OR_BUFFER_EMPTY static_cast<MLErrorCode>(45)
949#define ML_STACK_TABLE_OR_BUFFER_NOT_EMPTY static_cast<MLErrorCode>(46)
952#define ML_ELEMENT_NOT_FOUND static_cast<MLErrorCode>(47)
956#define ML_INVALID_FILE_NAME static_cast<MLErrorCode>(48)
959#define ML_INVALID_FILE_DESCRIPTOR static_cast<MLErrorCode>(49)
962#define ML_FILE_NOT_OPEN static_cast<MLErrorCode>(50)
967#define ML_NO_OR_INVALID_PERMISSIONS static_cast<MLErrorCode>(51)
971#define ML_DISK_OR_RESSOURCE_FULL static_cast<MLErrorCode>(52)
978#define ML_FILE_OR_DATA_STRUCTURE_CORRUPTED static_cast<MLErrorCode>(53)
982#define ML_INVALID_VERSION static_cast<MLErrorCode>(54)
989#define ML_UNKNOWN_OR_INVALID_COMPRESSION_SCHEME static_cast<MLErrorCode>(55)
996#define ML_TYPE_ALREADY_REGISTERED static_cast<MLErrorCode>(56)
1000#define ML_TYPE_IS_ABSTRACT static_cast<MLErrorCode>(57)
1004#define ML_TYPE_NOT_DERIVED_FROM_EXPECTED_PARENT_CLASS static_cast<MLErrorCode>(58)
1007#define ML_OPERATION_INTERRUPTED static_cast<MLErrorCode>(59)
1011#define ML_BAD_PAGE_ID static_cast<MLErrorCode>(60)
1016#define ML_OUT_OF_RESSOURCES static_cast<MLErrorCode>(61)
1019#define ML_OBJECT_OR_FILE_EXISTS static_cast<MLErrorCode>(62)
1022#define ML_OBJECT_OR_FILE_DOES_NOT_EXIST static_cast<MLErrorCode>(63)
1025#define ML_DEADLOCK_WOULD_OCCURR static_cast<MLErrorCode>(64)
1030#define ML_COULD_NOT_OPEN_FILE static_cast<MLErrorCode>(65)
1034#define ML_COULD_NOT_CREATE_OPEN_OR_MODIFY_FILE ML_COULD_NOT_OPEN_FILE
1037#define ML_LIBRARY_UNLOAD_ERROR static_cast<MLErrorCode>(66)
1040#define ML_LIBRARY_UNLOAD_EXCEPTION static_cast<MLErrorCode>(67)
1043#define ML_NOT_SUPPORTED_ON_THIS_SYSTEM static_cast<MLErrorCode>(68)
1046#define ML_OBJECT_STILL_REFERENCED static_cast<MLErrorCode>(69)
1049#define ML_REQUEST_OUTSIDE_OF_IMAGE static_cast<MLErrorCode>(70)
1052#define MLNumDefaultErrorCodes static_cast<MLErrorCode>(71)
1175 const char* messStr,
1177 const char** infos);
1192 void* objectData1,
void* objData2);
1534#define ML_CALC_FTYPE MLdouble
1541#define ML_CALC_ITYPE MLint
1548#define ML_TYPE_ASSIGN_FUNCTION_POINTERS() \
1549 getStringValue = MLTYPE_getStringValue; \
1550 setStringValue = MLTYPE_setStringValue; \
1551 setToMinimum = MLTYPE_setToMinimum; \
1552 setToMaximum = MLTYPE_setToMaximum; \
1553 setToDefault = MLTYPE_setToDefault; \
1554 getComponent = MLTYPE_getComponent; \
1555 setComponent = MLTYPE_setComponent; \
1556 copy = MLTYPE_copy; \
1557 arrayCopy = MLTYPE_arrayCopy; \
1558 arrayCopyWithStrides = MLTYPE_arrayCopyWithStrides; \
1559 arrayFill = MLTYPE_arrayFill; \
1561 castToBool = MLTYPE_castToBool; \
1562 castToInt = MLTYPE_castToInt; \
1563 castToDouble = MLTYPE_castToDouble; \
1564 castToOtherType = MLTYPE_castToOtherType; \
1565 castFromInt = MLTYPE_castFromInt; \
1566 castFromDouble = MLTYPE_castFromDouble; \
1567 castFromOtherType = MLTYPE_castFromOtherType; \
1569 isEqualToType = MLTYPE_isEqualToType; \
1570 isEqualToTypeWithEpsilon= MLTYPE_isEqualToTypeWithEpsilon;\
1572 negate = MLTYPE_negate; \
1573 normalize = MLTYPE_normalize; \
1575 arrayRescale = MLTYPE_arrayRescale; \
1576 interpolate = MLTYPE_interpolate; \
1577 arrayEqualsValue = MLTYPE_arrayEqualsValue; \
1578 arrayGetMinMax = MLTYPE_arrayGetMinMax; \
1580 multWithInt = MLTYPE_multWithInt; \
1581 multWithDouble = MLTYPE_multWithDouble; \
1582 multWithType = MLTYPE_multWithType; \
1583 multWithOtherType = MLTYPE_multWithOtherType; \
1585 plusInt = MLTYPE_plusInt; \
1586 plusDouble = MLTYPE_plusDouble; \
1587 plusType = MLTYPE_plusType;
#define ML_MAX_COMPONENTS_EXTENDED_TYPE
@ MLuint8Type
Enumerator for the unsigned 8-bit ML integer type.
@ MLuint32Type
Enumerator for the unsigned 32-bit ML integer type.
@ MLfloatType
Enumerator for the signed 32-bit ML floating point type.
@ MLuint16Type
Enumerator for the unsigned 16-bit ML integer type.
@ MLint64Type
Enumerator for the signed 64-bit ML integer type.
@ MLint16Type
Enumerator for the signed 16-bit ML integer type.
@ MLint32Type
Enumerator for the signed 32-bit ML integer type.
@ MLdoubleType
Enumerator for the signed 64-bit ML floating point type.
@ MLint8Type
Enumerator for the signed 8-bit ML integer type.
@ MLuint64Type
Enumerator for the unsigned 64-bit ML integer type.
MLint32 MLErrorCode
Type of an ML Error code.
MLCheckBits
Enumerator describing runtime and final checks in the ML.
@ ML_FINAL_RUNTIME_CHECK_BIT
Final checks in the RuntimeType system are activated.
@ ML_ALL_CHECKS_BITS
All available checks are activated.
@ ML_NO_CHECKS_BITS
All checks are deactivated.
MLNotifyChangedObjectType
@ ML_NOTIFY_NO_OBJECT_TYPE
@ ML_NOTIFY_ERROR_OUTPUT_OTHER_CHANGES
@ ML_NOTIFY_ERROR_OUTPUT_TERMINATION_TYPE
@ ML_NOTIFY_HOST_MAX_NUM_THREADS
@ ML_NOTIFY_CACHE_MONITORING_LEVEL
@ ML_NOTIFY_ERROR_OUTPUT_MESSAGE_FILTER
@ ML_NOTIFY_ERROR_OUTPUT_FULL_DEBUGGING
@ ML_NOTIFY_MODULE_INSTANTIATED
@ ML_NOTIFY_API_EXCEPTIONS
@ ML_NOTIFY_HOST_USE_CLASSIC_HOST
@ ML_NOTIFY_ERROR_OUTPUT_ERROR_OUTPUT_CB
@ ML_NOTIFY_CACHE_MEM_OPT_LEVEL
@ ML_NOTIFY_RUNTIME_TYPE_ADDED
@ ML_NOTIFY_HOST_BREAK_CHECK_CB
@ ML_NOTIFY_API_CHECKS_BITS
@ ML_NOTIFY_MODULE_DELETED
@ ML_NOTIFY_CACHE_MAX_SIZE
@ ML_NOTIFY_RUNTIME_TYPE_REMOVED
@ ML_NOTIFY_FIELD_HANDLED
@ ML_NOTIFY_ERROR_OUTPUT_DEBUG_ENV_NAMES
@ ML_NOTIFY_HOST_PROGRESS_CB
MLuint64 MLTypePropertyBits
Structure to define a bit mask that identifies all implemented functions for a data type.
signed short * MLint16Ptr
MLTerminator
Termination types for error handling.
@ ML_EXITCODE
Terminates the application with exit(ErrorCode), not recommended for use in normal code.
@ ML_EXIT0
Terminates the application with exit(0), not recommended for use in normal code.
@ ML_CONTINUE
Tries to ignore the message and to continue.
double(* MLDblFuncPtr)(double)
A function pointer type to a function that returns a double and takes a double as argument.
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...
UINT64 MLuint64
Introduce platform-independent 64-bit unsigned integer type.
MLMemoryErrorHandling
Enumerator to specify memory error handling.
@ ML_FATAL_MEMORY_ERROR
On allocation failure, a fatal error print is done and NULL is returned.
@ ML_THROW_NO_MEMORY
On allocation failure, a throw(ML_NO_MEMORY) is executed.
@ ML_RETURN_NULL
On allocation failure, NULL is returned without error handling.
@ ML_FATAL_MEMORY_ERROR_AND_THROW_NO_MEMORY
On allocation failure, a fatal error is posted and ML_NO_MEMORY is thrown.
MLNotifyChangedClassType
Codes for ML classes that may change:
@ ML_NOTIFY_MODULE
0x0020 = Module
@ ML_NOTIFY_API
0x0002 = API
@ ML_NOTIFY_CACHE
0x0008 = Cache
@ ML_NOTIFY_NO_OBJECT
0x0000 = No object
@ ML_NOTIFY_HOST
0x0010 = Host
@ ML_NOTIFY_RUNTIME
0x0004 = Runtime
@ ML_NOTIFY_ERROR_OUTPUT
0x0001 = ErrorOutput
long double * MLldoublePtr
MLint MLsoffset
Signed ML offset type that is a 32-bit signed integer on 32-bit platforms and a 64-bit integer on 64-...
MLint64 * MLintPtr
A pointer to the signed ML integer type MLint.
UINT64 * MLuint64Ptr
Introduce platform-independent 64-bit unsigned integer pointer type.
const char * MLApplicationGetStringPropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
MLint32 MLHostBreakCheckCB(void *usrData, void **hitField)
MLArrayIndex
Indexes for axes, arrays and vectors.
@ ML_VT
Array index for t (time) components (entry 4).
@ ML_VC
Array index for c (color) components (entry 3).
@ ML_VY
Array index for y components (entry 1).
@ ML_VU
Array index for u (unit/user dimension) components (entry 5).
@ ML_VZ
Array index for z components (entry 2).
@ ML_VW
Array index for w (for components of homogeneous vectors, entry 3).
@ ML_VX
Array index for x components (entry 0).
void MLRequestProgressCB(void *usrData, double progress)
unsigned char * MLuint8Ptr
MLEventFilterApplicationMessage
@ ML_EVENTFILTER_REMOVE_CB
unsigned int * MLuint32Ptr
void MLEventFilterApplicationHookCB(void *applicationUsrData, MLEventFilterApplicationMessage type, MLEventFilterCB *cb, void *usrData, MLuint32 fromMessageId, MLuint32 toMessageId)
unsigned char MLTypeData
This is the pointer type used to point to the data of MLType data instances.
MLTypeGroupIds
Some predefined type groups.
void MLSensorCB(void *usrData, void *sensor)
INT64 MLint64
Include 64-bit integer support for Windows or Unix.
unsigned short * MLuint16Ptr
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...
void MLMessageCB(void *usrData, MLErrorCode errCode, MLMessageType messageType, const char *messStr, int line, const char **infos)
Handling/setting/getting of ML messages callbacks.
MLint32 MLApplicationGetBoolPropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
MLuint64 MLuoffset
Unsigned ML offset type that is a 32-bit unsigned integer on 32-bit platforms and 64-bit one on 64-bi...
void MLNotifyCB(MLuint32 objType, void *usrData, void *objectData1, void *objData2)
MLint32 MLEventFilterCB(void *usrData, void *event)
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...
INT64 * MLint64Ptr
Introduce platform-independent 64-bit signed integer pointer type.
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-...
void MLHostProgressCB(void *usrData, const char *info1, const char *info2)
MLuint64 * MLuintPtr
A pointer to the unsigned ML integer type MLuint.
MLMessageType
Message types handled by the ErrorOutput class.
MLSign
Definition of possible signs as enumerator.
@ ML_NEGATIVE_SIGN
Negative sign enumerator.
@ ML_ZERO_SIGN
Enumerator for no negative and no positive sign (=0).
@ ML_POSITIVE_SIGN
Positive sign enumerator.
void ML_UTILS_EXPORT logTypeComponentsFromStringError(const char *function)
Defines all callbacks that an application has to support for property access.
MLApplicationGetDoublePropertyCB * _getDoubleCB
Callback to be set by an application to return a double property.
MLApplicationGetBoolPropertyCB * _getBoolCB
Callback to be set by an application to return a boolean property.
MLApplicationGetStringPropertyCB * _getStringCB
Callback to be set by an application to return a string property.
MLApplicationGetInt32PropertyCB * _getInt32CB
Callback to be set by an application to return a int32 property.
void * _applicationUsrData
Defines the user data that is supplied with all callbacks.
void(* Function_CastToOtherType)(const MLTypeData *myData, const MLTypeInfos *otherInfos, MLTypeData *otherData)
Function_CastFromDouble castFromDouble
Casts the first (the double) parameter to the data type and returns it into second parameter.
Function_GetStringValue getStringValue
bool(* Function_CastToBool)(const MLTypeData *p)
void(* Function_ArrayCopyWithStrides)(const MLTypeData *source, MLssize_t sourceStride, MLTypeData *dest, MLssize_t destStride, size_t size)
Function_IsEqualToType isEqualToType
Returns true if both parameters are equal; otherwise, it returns false.
Function_ArrayFill arrayFill
Sets the first parameter to array at the second one.
const MLTypeData * typeDefaultPtr
Data type default specified by derived class.
Function_ArrayCopyWithStrides arrayCopyWithStrides
Same as arrayCopy, but allows to specify stride values for source and destination.
MLint(* Function_CastToInt)(const MLTypeData *p)
void(* Function_CastFromInt)(MLint value, MLTypeData *result)
Function_SetStringValue setStringValue
Try to convert string as far as possible. If string cannot be scanned at all, then use the data type ...
Function_CopyValue normalize
Normalizes the type value from parameter 1 and writes it into parameter 2.
void(* Function_SetStringValue)(const char *str, MLTypeData *result)
bool(* Function_IsEqualToTypeWithEpsilon)(const MLTypeData *source1, const MLTypeData *source2, MLdouble epsilon)
MLTypeGroup typeGroup
Type group to which this type belongs.
void(* Function_ArrayCopy)(const MLTypeData *source, MLTypeData *dest, size_t size)
Function_ApplyIntOperation multWithInt
Implements multiplication with integer. Result is written into parameter three.
size_t componentOffsets[ML_MAX_COMPONENTS_EXTENDED_TYPE]
Array of offsets from the first to other components to address any component directly.
void(* Function_ArrayFill)(const MLTypeData *fillValue, MLTypeData *dest, size_t size)
Function_SetTo setToMaximum
Sets the value to minimum value. Must be implemented.
Function_ArrayCopy arrayCopy
Copies the number of elements of the first parameter to the second one.
char *(* Function_GetStringValue)(const MLTypeData *p)
Function_SetTo setToDefault
Sets the value to default value. Must be implemented.
Function_GetComponent getComponent
Returns the n-th component of the type as double.
Function_CopyValue copy
Copies the first parameter to the second one.
const MLTypeData * typeMinPtr
Data type minimum specified by derived class.
Function_ApplyIntOperation plusInt
Implements integer addition to parameter one. Result is written into parameter three.
void(* Function_SetComponent)(MLTypeData *dest, size_t componentIndex, MLdouble value)
void(* Function_CastFromDouble)(MLdouble value, MLTypeData *result)
void(* Function_SetTo)(MLTypeData *dest)
void(* Function_Interpolate)(const MLTypeData *source1, const MLTypeData *source2, MLdouble alpha, MLTypeData *result)
void(* Function_ApplyDoubleOperation)(const MLTypeData *source, MLdouble value, MLTypeData *result)
const MLTypeData * typeMaxPtr
Data type maximum specified by derived class.
void(* Function_ApplyIntOperation)(const MLTypeData *source, MLint value, MLTypeData *result)
const char * structInfoString
Function_ArrayEqualsValue arrayEqualsValue
bool(* Function_IsEqualToType)(const MLTypeData *source1, const MLTypeData *source2)
MLdouble(* Function_GetComponent)(const MLTypeData *source, size_t componentIndex)
Function_CastToDouble castToDouble
Returns a type value cast to double.
void(* Function_MultWithOtherType)(const MLTypeInfos *myInfos, const MLTypeData *myData, const MLTypeData *otherData, MLTypeData *result)
Function_CopyValue negate
Negates the value.
MLint32 dataTypeId
Real MLDataType id of under which these operations are registered as data type.
void(* Function_CopyValue)(const MLTypeData *source, MLTypeData *dest)
void(* Function_CastFromOtherType)(const MLTypeInfos *myInfos, const MLTypeData *myData, MLTypeData *otherData)
Function_ApplyOperation plusType
Implements parameter two addition to parameter one. Result is written into parameter three.
Function_ApplyOperation multWithType
Implements multiplication with its own type. Result is written into parameter three.
size_t numGoodCastTos
Number of datatypes to which this type can be cast without information or functionality loss.
MLDataType rangeAndPrecisionEquivalent
Standard data type which has a comparable range and precision behavior.
Function_ApplyDoubleOperation plusDouble
Implements double addition to parameter one. Result is written into parameter three.
size_t typeSize
sizeof the data type in bytes.
Function_CastToOtherType castToOtherType
Casts data to another registered type.
Function_ArrayRescale arrayRescale
MLdouble dblMin
double minimum of data type if it exists.
Function_IsEqualToTypeWithEpsilon isEqualToTypeWithEpsilon
Returns true if both parameters are equal within a static epsilon; otherwise, it returns false.
void(* Function_ApplyOperation)(const MLTypeData *source1, const MLTypeData *source2, MLTypeData *result)
void(* Function_ArrayRescale)(const MLTypeData *source, MLdouble scaleFactor, const MLTypeData *offset, MLTypeData *dest, size_t size)
const char * name
Pointer to the data type name.
Function_ApplyDoubleOperation multWithDouble
Implements multiplication with double. Result is written into parameter three.
Function_ArrayGetMinMax arrayGetMinMax
bool(* Function_ArrayEqualsValue)(const MLTypeData *value, const MLTypeData *buffer, size_t size)
Function_CastFromOtherType castFromOtherType
Casts another registered type to data.
Function_CastToBool castToBool
Returns a type value cast to bool. Usually an equality to 0 should return false, e....
MLdouble dblMax
double maximum of data type if it exists.
Function_SetTo setToMinimum
Sets the value to minimum value. Must be implemented.
Function_CastToInt castToInt
Returns a type value cast to integer.
Function_SetComponent setComponent
Sets the n-th component of the type from double (applying rounding if needed).
void(* Function_ArrayGetMinMax)(const MLTypeData *source, size_t size, MLdouble &min, MLdouble &max)
const char ** goodCastTos
Data types names to which this type can be cast without information or functionality loss.
Function_CastFromInt castFromInt
Casts the first (the integer) parameter to the data type and returns it into second parameter.
MLdouble(* Function_CastToDouble)(const MLTypeData *p)
size_t numComponents
Number of components of this data type. Equals number of characters in *structInfoString.
Function_Interpolate interpolate
MLTypePropertyBits propertyBits
Variable containing an enabled bit for each defined property.
Function_MultWithOtherType multWithOtherType
Implements multiplication with another type. Result is written into parameter three.