ML Reference
|
Structure containing all data type features and pointers to all functions needed to implement operations on any extended type. More...
#include <mlTypeDefs.h>
Public Attributes | |
size_t | numComponents |
size_t | numComps |
size_t | componentOffsets [ML_MAX_COMPONENTS_EXTENDED_TYPE] |
size_t | compOffsets [ML_MAX_COMPONENTS_EXTENDED_TYPE] |
Fixed type features which can be initialized in the constructor. | |
union { | |
size_t numComponents | |
size_t numComps | |
}; | |
size_t | typeSize |
sizeof the data type in bytes. | |
const char * | name |
Pointer to the data type name. | |
MLDataType | rangeAndPrecisionEquivalent |
Standard data type which has a comparable range and precision behavior. | |
MLdouble | dblMin |
double minimum of data type if it exists. | |
MLdouble | dblMax |
double maximum of data type if it exists. | |
const MLTypeData * | typeMinPtr |
Data type minimum specified by derived class. | |
const MLTypeData * | typeMaxPtr |
Data type maximum specified by derived class. | |
const MLTypeData * | typeDefaultPtr |
Data type default specified by derived class. | |
size_t | numGoodCastTos |
Number of data types to which this type can be casted without information or functionality loss. | |
const char ** | goodCastTos |
Data types names to which this type can be casted without information or functionality loss. | |
union { | |
size_t componentOffsets [ML_MAX_COMPONENTS_EXTENDED_TYPE] | |
size_t compOffsets [ML_MAX_COMPONENTS_EXTENDED_TYPE] | |
}; | |
const char * | structInfoString |
Pointer to a null-terminated string describing the type configuration. | |
MLint32 | dataTypeId |
Real MLDataType id of under which these operations are registered as data type. | |
MLTypeGroup | typeGroup |
Type group to which this type belongs. | |
MLTypePropertyBits | propertyBits |
Variable containing an enabled bit for each defined property. | |
Pointers to functions implementing type specific operations. | |
MLString_ConstData_Func | getStringValue |
Returns a value as a string. | |
MLVoid_ConstString_Data_Func | setStringValue |
Converts string s to value and write result into r. | |
MLVoid_Data_Func | setToMinimum |
Sets value to minimum value. Must be implemented. | |
MLVoid_Data_Func | setToMaximum |
Sets value to minimum value. Must be implemented. | |
MLVoid_Data_Func | setToDefault |
Sets value to default value. Must be implemented. | |
MLDouble_ConstData_SizeT_Func | getComponent |
Get n-th component of the type as double. | |
MLVoid_Data_SizeT_Double_Func | setComponent |
Set n-th component of the type from double (applying rounding if needed) | |
MLVoid_ConstData_Data_Func | copy |
Copies first parameter to second one. | |
MLVoid_ConstData_Data_SizeT_Func | arrayCopy |
Copies number of elements at first parameter to second one. | |
MLVoid_ConstData_SSizeT_Data_SSizeT_SizeT_Func | arrayCopyWithStrides |
Same as above, but allows to specify stride values for source and destination. | |
MLVoid_ConstData_Data_SizeT_Func | arrayFill |
Sets first parameter to array at second one. | |
MLBool_ConstData_Func | castToBool |
Returns a type value cast to bool. Usually an equality to 0 should return false, e.g., a null vector. | |
MLInt_ConstData_Func | castToInt |
Returns a type value cast to integer. | |
MLDouble_ConstData_Func | castToDouble |
Returns a type value cast to double. | |
MLVoid_ConstData_ConstInfos_Data_Func | castToOtherType |
Casts data to another registered type. | |
MLVoid_Int_Data_Func | castFromInt |
Casts the first (the integer) parameter to the data type and returns it into second parameter. | |
MLVoid_Double_Data_Func | castFromDouble |
Casts the first (the double) parameter to the data type and returns it into second parameter. | |
MLVoid_ConstInfos_ConstData_Data_Func | castFromOtherType |
Casts another registered type to data. | |
MLBool_ConstData_ConstData_Func | isEqualToType |
Returns true if both parameters are equal, otherwise false . | |
MLBool_ConstData_ConstData_Double_Func | isEqualToTypeWithEpsilon |
Returns true if both parameters are equal within a static epsilon, otherwise false . | |
MLVoid_ConstData_Data_Func | negate |
Negates the value. | |
MLVoid_ConstData_Data_Func | normalize |
Normalizes the type value from parameter 1 and write it into parameter 2. | |
MLVoid_ConstData_Double_ConstData_Data_SizeT_Func | arrayRescale |
Scale the values from the first parameter with the second parameter and offset it with the value from the third parameter, writing it to the position of the fourth parameter, times the fifth parameter. | |
MLBool_ConstData_ConstData_SizeT_Func | arrayEqualsValue |
Check that the first argument equals all the values given with the second argument (and the size in the third argument), returns true if all values are equal. | |
MLVoid_ConstData_SizeT_DoubleRef_DoubleRef_Func | arrayGetMinMax |
Get the mininum 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. | |
MLVoid_ConstData_ConstData_Double_Data_Func | interpolate |
Interpolate linearly between the first and the second parameter, at the position given by the third parameter (between 0 and 1). | |
MLVoid_ConstData_Int_Data_Func | multWithInt |
Implements multiplication with integer. Result written into parameter three. | |
MLVoid_ConstData_Double_Data_Func | multWithDouble |
Implements multiplication with double. Result written into parameter three. | |
MLVoid_ConstData_ConstData_Data_Func | multWithType |
Implements multiplication with its own type. Result written into parameter three. | |
MLVoid_ConstInfos_ConstData_ConstData_Data_Func | multWithOtherType |
Implements multiplication with another type. Result written into parameter three. | |
MLVoid_ConstData_Int_Data_Func | plusInt |
Implements integer addition to parameter one. Result written into parameter three. | |
MLVoid_ConstData_Double_Data_Func | plusDouble |
Implements double addition to parameter one. Result written into parameter three. | |
MLVoid_ConstData_ConstData_Data_Func | plusType |
Implements parameter two addition to parameter one. Result written into parameter three. |
Structure containing all data type features and pointers to all functions needed to implement operations on any extended type.
It also contains a bit mask describing implemented functions. It is a wrapper for any information and code needed to use any standard or user defined data type used by the ML. For the default data types used by the ML see mlStdTypeInfos.h.
Definition at line 1522 of file mlTypeDefs.h.
union { ... } |
union { ... } |
Copies number of elements at first parameter to second one.
Definition at line 1629 of file mlTypeDefs.h.
Same as above, but allows to specify stride values for source and destination.
Definition at line 1631 of file mlTypeDefs.h.
Check that the first argument equals all the values given with the second argument (and the size in the third argument), returns true if all values are equal.
Definition at line 1670 of file mlTypeDefs.h.
Sets first parameter to array at second one.
Definition at line 1633 of file mlTypeDefs.h.
Get the mininum 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 at line 1675 of file mlTypeDefs.h.
Scale the values from the first parameter with the second parameter and offset it with the value from the third parameter, writing it to the position of the fourth parameter, times the fifth parameter.
Definition at line 1665 of file mlTypeDefs.h.
Casts the first (the double) parameter to the data type and returns it into second parameter.
Definition at line 1647 of file mlTypeDefs.h.
Casts the first (the integer) parameter to the data type and returns it into second parameter.
Definition at line 1645 of file mlTypeDefs.h.
Casts another registered type to data.
Definition at line 1649 of file mlTypeDefs.h.
Returns a type value cast to bool. Usually an equality to 0 should return false, e.g., a null vector.
Definition at line 1636 of file mlTypeDefs.h.
Returns a type value cast to double.
Definition at line 1640 of file mlTypeDefs.h.
Returns a type value cast to integer.
Definition at line 1638 of file mlTypeDefs.h.
Casts data to another registered type.
Definition at line 1642 of file mlTypeDefs.h.
size_t MLTypeInfos::compOffsets[ML_MAX_COMPONENTS_EXTENDED_TYPE] |
Definition at line 1571 of file mlTypeDefs.h.
size_t MLTypeInfos::componentOffsets[ML_MAX_COMPONENTS_EXTENDED_TYPE] |
Definition at line 1570 of file mlTypeDefs.h.
Copies first parameter to second one.
Definition at line 1627 of file mlTypeDefs.h.
Real MLDataType id of under which these operations are registered as data type.
Definition at line 1594 of file mlTypeDefs.h.
double maximum of data type if it exists.
Definition at line 1550 of file mlTypeDefs.h.
double minimum of data type if it exists.
Definition at line 1547 of file mlTypeDefs.h.
Get n-th component of the type as double.
Definition at line 1623 of file mlTypeDefs.h.
Returns a value as a string.
If possible it should contain only numbers and spaces, no commas, colons, brackets, etc., to have better chances for conversions to MLFields. The returned string must be freed with MLFree() or ml::Memory::freeMemory().
Definition at line 1611 of file mlTypeDefs.h.
const char** MLTypeInfos::goodCastTos |
Data types names to which this type can be casted without information or functionality loss.
Definition at line 1565 of file mlTypeDefs.h.
Interpolate linearly between the first and the second parameter, at the position given by the third parameter (between 0 and 1).
Result written into parameter three.
Definition at line 1680 of file mlTypeDefs.h.
Returns true
if both parameters are equal, otherwise false
.
Definition at line 1652 of file mlTypeDefs.h.
Returns true
if both parameters are equal within a static epsilon, otherwise false
.
Definition at line 1655 of file mlTypeDefs.h.
Implements multiplication with double. Result written into parameter three.
Definition at line 1685 of file mlTypeDefs.h.
Implements multiplication with integer. Result written into parameter three.
Definition at line 1683 of file mlTypeDefs.h.
Implements multiplication with another type. Result written into parameter three.
Definition at line 1689 of file mlTypeDefs.h.
Implements multiplication with its own type. Result written into parameter three.
Definition at line 1687 of file mlTypeDefs.h.
const char* MLTypeInfos::name |
Pointer to the data type name.
Definition at line 1541 of file mlTypeDefs.h.
Referenced by ml::MLTStdTypeInfos< VTYP >::typeName().
Negates the value.
Definition at line 1658 of file mlTypeDefs.h.
Normalizes the type value from parameter 1 and write it into parameter 2.
Definition at line 1660 of file mlTypeDefs.h.
size_t MLTypeInfos::numComponents |
Definition at line 1530 of file mlTypeDefs.h.
size_t MLTypeInfos::numComps |
Definition at line 1531 of file mlTypeDefs.h.
size_t MLTypeInfos::numGoodCastTos |
Number of data types to which this type can be casted without information or functionality loss.
Definition at line 1562 of file mlTypeDefs.h.
Implements double addition to parameter one. Result written into parameter three.
Definition at line 1694 of file mlTypeDefs.h.
Implements integer addition to parameter one. Result written into parameter three.
Definition at line 1692 of file mlTypeDefs.h.
Implements parameter two addition to parameter one. Result written into parameter three.
Definition at line 1696 of file mlTypeDefs.h.
Variable containing an enabled bit for each defined property.
Definition at line 1600 of file mlTypeDefs.h.
Standard data type which has a comparable range and precision behavior.
Definition at line 1544 of file mlTypeDefs.h.
Set n-th component of the type from double (applying rounding if needed)
Definition at line 1625 of file mlTypeDefs.h.
Converts string s to value and write result into r.
Try to convert string as far as possible. If string cannot be scanned at all then use the data type default.
Definition at line 1614 of file mlTypeDefs.h.
Sets value to default value. Must be implemented.
Definition at line 1621 of file mlTypeDefs.h.
Sets value to minimum value. Must be implemented.
Definition at line 1619 of file mlTypeDefs.h.
Sets value to minimum value. Must be implemented.
Definition at line 1617 of file mlTypeDefs.h.
const char* MLTypeInfos::structInfoString |
Pointer to a null-terminated string describing the type configuration.
"b" for a Boolean. "c" for an unsigned character. "C" for a (signed) character. "s" for an unsigned short. "S" for a signed short. "i" for an unsigned int. "I" for a signed int. "l" for an unsigned long. "L" for a signed long. "f" for a float. "d" for a double. "D" for a long double. So a data type consisting of a float[3], a bool, and two signed integers would lead to "fffbII".
Definition at line 1591 of file mlTypeDefs.h.
Data type default specified by derived class.
Definition at line 1559 of file mlTypeDefs.h.
Type group to which this type belongs.
Definition at line 1597 of file mlTypeDefs.h.
Data type maximum specified by derived class.
Definition at line 1556 of file mlTypeDefs.h.
Data type minimum specified by derived class.
Definition at line 1553 of file mlTypeDefs.h.
size_t MLTypeInfos::typeSize |
sizeof the data type in bytes.
Definition at line 1538 of file mlTypeDefs.h.