User`s guide
Internal Interface Functions
5-15
* output. The void interface function specifies zero
* output arguments to the implementation version of the
* function, and in the event that the implementation
* version still returns an output (which, in MATLAB, would
* be assigned to the "ans" variable), it deallocates the
* output. This function processes any input arguments and
* passes them to the implementation version of the
* function, appearing above.
*/
C++ Interface Functions
TheC++interfacefunctions processanyinputarguments and pass them to the
implementation version of the function.
Note In C++, the mlxF interface functions are also C functions in order to
allow the feval interface to be uniform betwe en C and C++.
mlx
F
Interface Function
The Com p ile r always generate s the mlxF interface function, which is used by
feval. At times, the Compiler needs to use feval to perform argument
matching even if the user does not specifically call
feval. For example,
x = cell(1,5);
y = {1 2 3 4 5};
[x{:}] = deal(y{:});
void mlfVFoo(mxArray * x, mxArray * y) {
mxArray * a = NULL;
mxArray * b = NULL;
mlfEnterNewContext(0, 2, x, y);
a = Mfoo(&b, 0, x, y);
mlfRestorePreviousContext(0, 2, x, y);
mxDestroyArray(a);
mxDestroyArray(b);
}
Input argument
processing
Output argument
processing
Call M-function