www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgpointobjective/getStaticExpressions.m

    function [pExpr, EvalFuncs] = getStaticExpressions(obj, type)
%GETSTATICEXPRESSIONS Get expressions that are required by static methods
%
%  [PEXPR, EVALFUNCS] = GETSTATICEXPRESSIONS(OBJ) returns a list of
%  expression pointers and associated evaluation functions for each one.
%  These expression/function pairs are the ones that the item will need
%  access to in its static methods.
%
%  [PEXPR, EVALFUNCS] = GETSTATICEXPRESSIONS(OBJ, OP) specifies the
%  operation that the static data is required for.  The default value is
%  'Evaluate'.  All items also support 'NaturalEvaluate'.  Some subclasses
%  may also provide additional options.

%  Copyright 2005-2006 The MathWorks, Inc. and Ford Global Technologies, Inc.


if nargin<2
    type = 'Evaluate';
end

pExpr = obj.Expression;
if isvalid(pExpr)
    switch type
        case {'Evaluate', 'NaturalEvaluate'}
            EvalFuncs = {'evalAtInputs'};
        otherwise
            EvalFuncs = {''};
    end
else
    pExpr = mbcpointer(1,0);
    EvalFuncs = {};
end