www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgnormaliser/cgimportptr.m

    function LT= cgimportptr(LT,RefMap)
%CGIMPORTPTR Remap internal pointers during import
%
%  OBJ = cgimportptr(OBJ, REFMAP)

%  Copyright 2005-2012 The MathWorks, Inc.


OK= ismember(LT.SFlist,RefMap{1});
LT.SFlist = LT.SFlist(OK);

OK= ismember(LT.Flist,RefMap{1});
LT.Flist = LT.Flist(OK);

ind= RefMap{1}==address(LT);
NewLT= info(RefMap{2}(ind));
rep=  isa(NewLT,'cgnormaliser') && strcmp(getname(NewLT),getname(LT));

LT = mapptr(LT,RefMap);

if rep
    % combine new and old SFlist, Flist
    LT.SFlist= unique([LT.SFlist;NewLT.SFlist]);
    LT.Flist= unique([LT.Flist;NewLT.Flist]);
end