📄 structcombine.cpp
字号:
//
// MATLAB Compiler: 3.0
// Date: Mon May 17 11:03:48 2004
// Arguments: "-B" "macro_default" "-O" "all" "-O" "fold_scalar_mxarrays:on"
// "-O" "fold_non_scalar_mxarrays:on" "-O" "optimize_integer_for_loops:on" "-O"
// "array_indexing:on" "-O" "optimize_conditionals:on" "-M" "-silentsetup" "-d"
// "D:/MATLAB6p5p1/work/book/dataconversion/comtools/src" "-v" "-B"
// "cppcom:structcombinecom,structcombinecom,1.0" "-B"
// "ccom:structcombinecom,structcombinecom,1.0" "-t" "-W"
// "com:structcombinecom,structcombinecom,1.0" "-T" "link:lib" "-h"
// "libmmfile.mlib" "-i" "-L" "cpp" "-g" "-G" "-A" "debugline:on" "-O" "none"
// "-O" "fold_scalar_mxarrays:off" "-O" "fold_non_scalar_mxarrays:off" "-O"
// "optimize_integer_for_loops:off" "-O" "array_indexing:off" "-O"
// "optimize_conditionals:off" "-O" "speculate:off" "-i"
// "D:/MATLAB6p5p1/work/book/dataconversion/comtools/structcombine.m"
//
#include "structcombine.hpp"
#include "libmatlbm.hpp"
void InitializeModule_structcombine() {
}
void TerminateModule_structcombine() {
}
static mwArray Mstructcombine(int nargout_,
mwArray structIn1,
mwArray structIn2,
mwArray name1,
mwArray name2);
_mexLocalFunctionTable _local_function_table_structcombine
= { 0, (mexFunctionTableEntry *)NULL };
//
// The function "structcombine" contains the normal interface for the
// "structcombine" M-function from file
// "d:\matlab6p5p1\work\book\dataconversion\comtools\structcombine.m" (lines
// 1-5). This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
mwArray structcombine(mwArray structIn1,
mwArray structIn2,
mwArray name1,
mwArray name2) {
int nargout = 1;
mwArray structOut = mwArray::UNDEFINED;
structOut = Mstructcombine(nargout, structIn1, structIn2, name1, name2);
return structOut;
}
//
// The function "mlxStructcombine" contains the feval interface for the
// "structcombine" M-function from file
// "d:\matlab6p5p1\work\book\dataconversion\comtools\structcombine.m" (lines
// 1-5). The feval function calls the implementation version of structcombine
// through this function. This function processes any input arguments and
// passes them to the implementation version of the function, appearing above.
//
void mlxStructcombine(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
MW_BEGIN_MLX();
{
mwArray mprhs[4];
mwArray mplhs[1];
int i;
mclCppUndefineArrays(1, mplhs);
if (nlhs > 1) {
error(
mwVarargin(
mwArray(
"Run-time Error: File: structcombine Line: 1 Column"
": 1 The function \"structcombine\" was called with"
" more than the declared number of outputs (1).")));
}
if (nrhs > 4) {
error(
mwVarargin(
mwArray(
"Run-time Error: File: structcombine Line: 1 Column"
": 1 The function \"structcombine\" was called with"
" more than the declared number of inputs (4).")));
}
for (i = 0; i < 4 && i < nrhs; ++i) {
mprhs[i] = mwArray(prhs[i], 0);
}
for (; i < 4; ++i) {
mprhs[i].MakeDIN();
}
mplhs[0] = Mstructcombine(nlhs, mprhs[0], mprhs[1], mprhs[2], mprhs[3]);
plhs[0] = mplhs[0].FreezeData();
}
MW_END_MLX();
}
//
// The function "Mstructcombine" is the implementation version of the
// "structcombine" M-function from file
// "d:\matlab6p5p1\work\book\dataconversion\comtools\structcombine.m" (lines
// 1-5). It contains the actual compiled code for that M-function. It is a
// static function and must only be called from one of the interface functions,
// appearing below.
//
//
// function [structOut]=structcombine(structIn1,structIn2,name1,name2)
//
static mwArray Mstructcombine(int nargout_,
mwArray structIn1,
mwArray structIn2,
mwArray name1,
mwArray name2) {
mclMlineEnterFunction(
"d:\\matlab6p5p1\\work\\book\\dataconversion\\comtools\\structcombine.m",
"structcombine")
mwLocalFunctionTable save_local_function_table_
= &_local_function_table_structcombine;
mwArray structOut = mwArray::UNDEFINED;
//
// %function [structOut]=structcombine(structIn1,structIn2,name1,name2)
// %结构体输入输出类型转换
// %将输入的两个结构体重新组合成新的结构体
// structOut=struct(name1,structIn1,name2,structIn2);
//
mclMline(4);
structOut
= struct_func(
mwVarargin(
mwVa(name1, "name1"),
mwVa(structIn1, "structIn1"),
mwVa(name2, "name2"),
mwVa(structIn2, "structIn2")));
mwValidateOutput(structOut, 1, nargout_, "structOut", "structcombine");
mclMlineFunctionReturn()
return structOut;
mclMlineExitFunctionReturn();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -