|
ML Reference
|
Base class for all variable types, mainly for Doxygen documentation purpose. More...
#include <mlTypedHandlers.h>
Base class for all variable types, mainly for Doxygen documentation purpose.
A variable type provides the dynamic mapping of a physical ML data type to the correct template data type.
Since it often does not make sense to support all possible datatypes for a given subimage, a variable type offers a mapping for the types that it supports and produces an error for the unsupported types.
The ML comes with the following variable types:
It is very easy to implement your own variable types. Have a look at the ML_IMPLEMENT_VARIABLE_TYPE_BEGIN macro. A typical case of a custom variable type is, for example, a type that supports only MLuint16 and MLdouble, but not the rest of the standard types to reduce template complexity.
Rationale for having variable types: since the ML supports many different datatypes, it makes sense to have different variable types that support a subset of the datatypes supported by the ML. This is done mainly because an ML module that supports all possible type combinations of output image type and input image type for all available types would lead to thousands of templated versions of calculateOutputSubImage, which quickly generates very large libraries or overflows the compiler's stack.
Definition at line 91 of file mlTypedHandlers.h.