www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgcontainer/gettype.m

    function tp = gettype(obj)
%GETTYPE Return the type description of a node
%
%  TP = GETTYPE(OBJ) returns a short (one or two words) string that
%  describes the type of a node.  The cgcontainer implementation calls
%  gettype on the contained data if it is an expression, otherwise the
%  superclass implementation is used.

%  Copyright 2005-2016 The MathWorks, Inc.


pData = getdata(obj);
if ~isempty(pData) && isvalid(pData)
    objData = pData.info;
    if isa(objData, 'cgexpr')
        tp = gettype(objData);
    else
        tp = getCageType(objData);
    end
else
    tp = gettype(obj.cgnode);
end