www.pudn.com > vcmatlab20060426WaterMark.zip > clf.cpp


// 
// MATLAB Compiler: 2.2 
// Date: Wed Jun 01 21:40:07 2005 
// 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" "C_imwrite"  
// 
#include "clf.hpp" 
#include "libmatlbm.hpp" 
#include "libmmfile.hpp" 
 
static mxChar _array1_[124] = { 'R', 'u', 'n', '-', 't', 'i', 'm', 'e', ' ', 
                                'E', 'r', 'r', 'o', 'r', ':', ' ', 'F', 'i', 
                                'l', 'e', ':', ' ', 'c', 'l', 'f', ' ', 'L', 
                                'i', 'n', 'e', ':', ' ', '1', ' ', 'C', 'o', 
                                'l', 'u', 'm', 'n', ':', ' ', '1', ' ', 'T', 
                                'h', 'e', ' ', 'f', 'u', 'n', 'c', 't', 'i', 
                                'o', 'n', ' ', '"', 'c', 'l', 'f', '"', ' ', 
                                'w', 'a', 's', ' ', 'c', 'a', 'l', 'l', 'e', 
                                'd', ' ', 'w', 'i', 't', 'h', ' ', 'm', 'o', 
                                'r', 'e', ' ', 't', 'h', 'a', 'n', ' ', 't', 
                                'h', 'e', ' ', 'd', 'e', 'c', 'l', 'a', 'r', 
                                'e', 'd', ' ', 'n', 'u', 'm', 'b', 'e', 'r', 
                                ' ', 'o', 'f', ' ', 'o', 'u', 't', 'p', 'u', 
                                't', 's', ' ', '(', '1', ')', '.' }; 
static mwArray _mxarray0_ = mclInitializeString(124, _array1_); 
 
void InitializeModule_clf() { 
} 
 
void TerminateModule_clf() { 
} 
 
static mwArray Mclf(int nargout_, mwArray varargin); 
 
_mexLocalFunctionTable _local_function_table_clf 
  = { 0, (mexFunctionTableEntry *)NULL }; 
 
// 
// The function "Nclf" contains the nargout interface for the "clf" M-function 
// from file "D:\matlab\matlab\toolbox\matlab\graphics\clf.m" (lines 1-28). 
// This interface is only produced if the M-function uses the special variable 
// "nargout". The nargout interface allows the number of requested outputs to 
// be specified via the nargout argument, as opposed to the normal interface 
// which dynamically calculates the number of outputs based on the number of 
// non-NULL inputs it receives. This function processes any input arguments and 
// passes them to the implementation version of the function, appearing above. 
// 
mwArray Nclf(int nargout, mwVarargin varargin) { 
    mwArray ret_fig(mclGetUninitializedArray()); 
    ret_fig = Mclf(nargout, varargin.ToArray()); 
    return ret_fig; 
} 
 
// 
// The function "clf" contains the normal interface for the "clf" M-function 
// from file "D:\matlab\matlab\toolbox\matlab\graphics\clf.m" (lines 1-28). 
// This function processes any input arguments and passes them to the 
// implementation version of the function, appearing above. 
// 
mwArray clf(mwVarargin varargin) { 
    int nargout(1); 
    mwArray ret_fig(mclGetUninitializedArray()); 
    ret_fig = Mclf(nargout, varargin.ToArray()); 
    return ret_fig; 
} 
 
// 
// The function "Vclf" contains the void interface for the "clf" M-function 
// from file "D:\matlab\matlab\toolbox\matlab\graphics\clf.m" (lines 1-28). The 
// void interface is only produced if the M-function uses the special variable 
// "nargout", and has at least one 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. 
// 
void Vclf(mwVarargin varargin) { 
    mwArray ret_fig(mwArray::UNDEFINED); 
    ret_fig = Mclf(0, varargin.ToArray()); 
} 
 
// 
// The function "mlxClf" contains the feval interface for the "clf" M-function 
// from file "D:\matlab\matlab\toolbox\matlab\graphics\clf.m" (lines 1-28). The 
// feval function calls the implementation version of clf through this 
// function. This function processes any input arguments and passes them to the 
// implementation version of the function, appearing above. 
// 
void mlxClf(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) { 
    MW_BEGIN_MLX(); 
    { 
        mwArray mprhs[1]; 
        mwArray mplhs[1]; 
        mclCppUninitializeArrays(1, mplhs); 
        if (nlhs > 1) { 
            error(_mxarray0_); 
        } 
        mprhs[0] = mclCreateVararginCell(nrhs, prhs); 
        mplhs[0] = Mclf(nlhs, mprhs[0]); 
        plhs[0] = mplhs[0].FreezeData(); 
    } 
    MW_END_MLX(); 
} 
 
// 
// The function "Mclf" is the implementation version of the "clf" M-function 
// from file "D:\matlab\matlab\toolbox\matlab\graphics\clf.m" (lines 1-28). 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 ret_fig = clf(varargin) 
// 
static mwArray Mclf(int nargout_, mwArray varargin) { 
    mclMlineEnterFunction( 
      "D:\\matlab\\matlab\\toolbox\\matlab\\graphics\\clf.m", "clf") 
    mwLocalFunctionTable save_local_function_table_(&_local_function_table_clf); 
    mwArray ret_fig(mclGetUninitializedArray()); 
    mwArray ans(mclGetUninitializedArray()); 
    // 
    // %CLF Clear current figure. 
    // %   CLF deletes all children of the current figure with visible handles. 
    // % 
    // %   CLF RESET deletes all children (including ones with hidden 
    // %   handles) and also resets all figure properties, except Position 
    // %   and Units, to their default values. 
    // % 
    // %   See also CLA, RESET, HOLD. 
    //  
    // %   CLF(..., HSAVE) deletes all children except those specified in 
    // %   HSAVE. 
    // % 
    // %   Copyright 1984-2001 The MathWorks, Inc.  
    // %   $Revision: 5.21 $  $Date: 2001/04/15 11:59:52 $ 
    //  
    // clo(gcf, varargin{:}); 
    // 
    mclMline(17); 
    ans.EqAns( 
      feval( 
        mwAnsVarargout(), 
        mlxGraphics_private_clo, 
        mwVarargin( 
          mwVe(gcf()), mwVe(mwVsa(varargin, "varargin").cell(colon()))))); 
    // 
    //  
    // % cause a complete redraw of the figure, so that movie frame remnants 
    // % are cleared as well 
    // refresh 
    // 
    mclMline(21); 
    refresh(mwArray::DIN); 
    // 
    //  
    // % now that IntegerHandle can be changed by reset, make sure 
    // % we're returning the new handle: 
    // if (nargout ~= 0) 
    // 
    mclMline(25); 
    if (nargout_ != 0) { 
        // 
        // ret_fig = gcf; 
        // 
        mclMline(26); 
        ret_fig = gcf(); 
    // 
    // end 
    // 
    mclMline(27); 
    } 
    mwValidateOutput(ret_fig, 1, nargout_, "ret_fig", "clf"); 
    mclMlineFunctionReturn() 
    return ret_fig; 
    mclMlineExitFunctionReturn(); 
}