?? images_private_checknargin.cpp
字號:
//
// MATLAB Compiler: 3.0
// Date: Wed Apr 25 16:38:48 2007
// 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" "-B" "sglcpp" "-p" "-W"
// "main" "-L" "Cpp" "-t" "-T" "link:exe" "-h" "libmmfile.mlib" "-W" "mainhg"
// "libmwsglm.mlib" "-l" "-p" "-W" "main" "-L" "Cpp" "-t" "-T" "link:exe" "-h"
// "libmmfile.mlib" "-h" "idct2.m"
//
#include "images_private_checknargin.hpp"
#include "libmatlbm.hpp"
static mxChar _array1_[22] = { 'I', 'm', 'a', 'g', 'e', 's', ':', '%',
's', ':', 't', 'o', 'o', 'F', 'e', 'w',
'I', 'n', 'p', 'u', 't', 's' };
static mwArray _mxarray0_ = mclInitializeString(22, _array1_);
static mwArray _mxarray2_ = mclInitializeDouble(1.0);
static mxChar _array4_[46] = { 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '%',
's', ' ', 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd',
' ', 'a', 't', ' ', 'l', 'e', 'a', 's', 't', ' ',
'1', ' ', 'i', 'n', 'p', 'u', 't', ' ', 'a', 'r',
'g', 'u', 'm', 'e', 'n', 't' };
static mwArray _mxarray3_ = mclInitializeString(46, _array4_);
static mxChar _array6_[48] = { 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '%',
's', ' ', 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd',
' ', 'a', 't', ' ', 'l', 'e', 'a', 's', 't', ' ',
'%', 'd', ' ', 'i', 'n', 'p', 'u', 't', ' ', 'a',
'r', 'g', 'u', 'm', 'e', 'n', 't', 's' };
static mwArray _mxarray5_ = mclInitializeString(48, _array6_);
static mxChar _array8_[45] = { 'b', 'u', 't', ' ', 'w', 'a', 's', ' ', 'c',
'a', 'l', 'l', 'e', 'd', ' ', 'i', 'n', 's',
't', 'e', 'a', 'd', ' ', 'w', 'i', 't', 'h',
' ', '1', ' ', 'i', 'n', 'p', 'u', 't', ' ',
'a', 'r', 'g', 'u', 'm', 'e', 'n', 't', '.' };
static mwArray _mxarray7_ = mclInitializeString(45, _array8_);
static mxChar _array10_[47] = { 'b', 'u', 't', ' ', 'w', 'a', 's', ' ',
'c', 'a', 'l', 'l', 'e', 'd', ' ', 'i',
'n', 's', 't', 'e', 'a', 'd', ' ', 'w',
'i', 't', 'h', ' ', '%', 'd', ' ', 'i',
'n', 'p', 'u', 't', ' ', 'a', 'r', 'g',
'u', 'm', 'e', 'n', 't', 's', '.' };
static mwArray _mxarray9_ = mclInitializeString(47, _array10_);
static mxChar _array12_[6] = { '%', 's', 0x005c, 'n', '%', 's' };
static mwArray _mxarray11_ = mclInitializeString(6, _array12_);
static mxChar _array14_[23] = { 'I', 'm', 'a', 'g', 'e', 's', ':', '%',
's', ':', 't', 'o', 'o', 'M', 'a', 'n',
'y', 'I', 'n', 'p', 'u', 't', 's' };
static mwArray _mxarray13_ = mclInitializeString(23, _array14_);
static mxChar _array16_[45] = { 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ',
'%', 's', ' ', 'e', 'x', 'p', 'e', 'c', 't',
'e', 'd', ' ', 'a', 't', ' ', 'm', 'o', 's',
't', ' ', '1', ' ', 'i', 'n', 'p', 'u', 't',
' ', 'a', 'r', 'g', 'u', 'm', 'e', 'n', 't' };
static mwArray _mxarray15_ = mclInitializeString(45, _array16_);
static mxChar _array18_[47] = { 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n',
' ', '%', 's', ' ', 'e', 'x', 'p', 'e',
'c', 't', 'e', 'd', ' ', 'a', 't', ' ',
'm', 'o', 's', 't', ' ', '%', 'd', ' ',
'i', 'n', 'p', 'u', 't', ' ', 'a', 'r',
'g', 'u', 'm', 'e', 'n', 't', 's' };
static mwArray _mxarray17_ = mclInitializeString(47, _array18_);
void InitializeModule_images_private_checknargin() {
}
void TerminateModule_images_private_checknargin() {
}
static void Mimages_private_checknargin(mwArray low,
mwArray high,
mwArray numInputs,
mwArray function_name);
_mexLocalFunctionTable _local_function_table_images_private_checknargin
= { 0, (mexFunctionTableEntry *)NULL };
//
// The function "images_private_checknargin" contains the normal interface for
// the "images/private/checknargin" M-function from file
// "d:\matlab6p5\toolbox\images\images\private\checknargin.m" (lines 1-59).
// This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
void images_private_checknargin(mwArray low,
mwArray high,
mwArray numInputs,
mwArray function_name) {
Mimages_private_checknargin(low, high, numInputs, function_name);
}
//
// The function "mlxImages_private_checknargin" contains the feval interface
// for the "images/private/checknargin" M-function from file
// "d:\matlab6p5\toolbox\images\images\private\checknargin.m" (lines 1-59). The
// feval function calls the implementation version of
// images/private/checknargin through this function. This function processes
// any input arguments and passes them to the implementation version of the
// function, appearing above.
//
void mlxImages_private_checknargin(int nlhs,
mxArray * plhs[],
int nrhs,
mxArray * prhs[]) {
MW_BEGIN_MLX();
{
mwArray mprhs[4];
int i;
if (nlhs > 0) {
error(
mwVarargin(
mwArray(
"Run-time Error: File: images/private/checknargin Line: 1 Co"
"lumn: 1 The function \"images/private/checknargin\" was cal"
"led with more than the declared number of outputs (0).")));
}
if (nrhs > 4) {
error(
mwVarargin(
mwArray(
"Run-time Error: File: images/private/checknargin Line: 1 Co"
"lumn: 1 The function \"images/private/checknargin\" was cal"
"led 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();
}
Mimages_private_checknargin(mprhs[0], mprhs[1], mprhs[2], mprhs[3]);
}
MW_END_MLX();
}
//
// The function "Mimages_private_checknargin" is the implementation version of
// the "images/private/checknargin" M-function from file
// "d:\matlab6p5\toolbox\images\images\private\checknargin.m" (lines 1-59). 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 checknargin(low, high, numInputs, function_name)
//
static void Mimages_private_checknargin(mwArray low,
mwArray high,
mwArray numInputs,
mwArray function_name) {
mclMlineEnterFunction(
"d:\\matlab6p5\\toolbox\\images\\images\\private\\checknargin.m",
"images/private/checknargin")
mwLocalFunctionTable save_local_function_table_
= &_local_function_table_images_private_checknargin;
mwArray ans = mwArray::UNDEFINED;
mwArray msg2 = mwArray::UNDEFINED;
mwArray msg1 = mwArray::UNDEFINED;
mwArray msgId = mwArray::UNDEFINED;
//
// %CHECKNARGIN Check number of input arguments.
// % CHECKNARGIN(LOW,HIGH,NUM_INPUTS,FUNCTION_NAME) checks whether NUM_INPUTS
// % is in the range indicated by LOW and HIGH. If not, CHECKNARGIN issues a
// % formatted error message using the string in FUNCTION_NAME.
// %
// % LOW should be a scalar nonnegative integer.
// %
// % HIGH should be a scalar nonnegative integer or Inf.
// %
// % FUNCTION_NAME should be a string.
//
// % Copyright 1993-2002 The MathWorks, Inc.
// % $Revision: 1.2 $ $Date: 2002/03/15 15:57:05 $
//
// % Input arguments are not checked for validity.
//
// if numInputs < low
//
mclMline(18);
if (mclLtBool(mwVa(numInputs, "numInputs"), mwVa(low, "low"))) {
//
// msgId = sprintf('Images:%s:tooFewInputs', function_name);
//
mclMline(19);
msgId
= sprintf(
_mxarray0_, mwVarargin(mwVa(function_name, "function_name")));
//
// if low == 1
//
mclMline(20);
if (mclEqBool(mwVa(low, "low"), _mxarray2_)) {
//
// msg1 = sprintf('Function %s expected at least 1 input argument', ...
//
mclMline(21);
msg1
= sprintf(
_mxarray3_,
mwVarargin(mwVa(function_name, "function_name")));
//
// function_name);
// else
//
mclMline(23);
} else {
//
// msg1 = sprintf('Function %s expected at least %d input arguments', ...
//
mclMline(24);
msg1
= sprintf(
_mxarray5_,
mwVarargin(
mwVa(function_name, "function_name"), mwVa(low, "low")));
//
// function_name, low);
// end
//
mclMline(26);
}
//
//
// if numInputs == 1
//
mclMline(28);
if (mclEqBool(mwVa(numInputs, "numInputs"), _mxarray2_)) {
//
// msg2 = 'but was called instead with 1 input argument.';
//
mclMline(29);
msg2 = _mxarray7_;
//
// else
//
mclMline(30);
} else {
//
// msg2 = sprintf('but was called instead with %d input arguments.', ...
//
mclMline(31);
msg2
= sprintf(_mxarray9_, mwVarargin(mwVa(numInputs, "numInputs")));
//
// numInputs);
// end
//
mclMline(33);
}
//
//
// error(msgId, '%s\n%s', msg1, msg2);
//
mclMline(35);
error(
mwVarargin(
mwVv(msgId, "msgId"),
_mxarray11_,
mwVv(msg1, "msg1"),
mwVv(msg2, "msg2")));
//
//
// elseif numInputs > high
//
mclMline(37);
} else if (mclGtBool(mwVa(numInputs, "numInputs"), mwVa(high, "high"))) {
//
// msgId = sprintf('Images:%s:tooManyInputs', function_name);
//
mclMline(38);
msgId
= sprintf(
_mxarray13_, mwVarargin(mwVa(function_name, "function_name")));
//
//
// if high == 1
//
mclMline(40);
if (mclEqBool(mwVa(high, "high"), _mxarray2_)) {
//
// msg1 = sprintf('Function %s expected at most 1 input argument', ...
//
mclMline(41);
msg1
= sprintf(
_mxarray15_,
mwVarargin(mwVa(function_name, "function_name")));
//
// function_name);
// else
//
mclMline(43);
} else {
//
// msg1 = sprintf('Function %s expected at most %d input arguments', ...
//
mclMline(44);
msg1
= sprintf(
_mxarray17_,
mwVarargin(
mwVa(function_name, "function_name"), mwVa(high, "high")));
//
// function_name, high);
// end
//
mclMline(46);
}
//
//
// if numInputs == 1
//
mclMline(48);
if (mclEqBool(mwVa(numInputs, "numInputs"), _mxarray2_)) {
//
// msg2 = 'but was called instead with 1 input argument.';
//
mclMline(49);
msg2 = _mxarray7_;
//
// else
//
mclMline(50);
} else {
//
// msg2 = sprintf('but was called instead with %d input arguments.', ...
//
mclMline(51);
msg2
= sprintf(_mxarray9_, mwVarargin(mwVa(numInputs, "numInputs")));
//
// numInputs);
// end
//
mclMline(53);
}
//
//
// error(msgId, '%s\n%s', msg1, msg2);
//
mclMline(55);
error(
mwVarargin(
mwVv(msgId, "msgId"),
_mxarray11_,
mwVv(msg1, "msg1"),
mwVv(msg2, "msg2")));
//
// end
//
mclMline(56);
}
//
//
//
//
//
mclMline(58);
mclMlineExitFunction();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -