www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@actionlist/mapptr.m

    function mapptr(h,RefMap)
%MAPPTR  Re-map pointers in the action list
%
%  h.mapptr(RefMap) remaps pointers in the commands in the action list
%  using RefMap.  Mapptr is NOT called on objects in the commands, only
%  pointers.
%

%  Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc.



for n=1:length(h.Actions)
   cmd = h.Actions(n).Command;
   if iscell(cmd)
      for k = 2:length(cmd)
         if isa(cmd{k},'xregpointer')
            cmd{k} = mapptr(cmd{k},RefMap);
         end
      end
      h.Actions(n).Command = cmd;
   end 
end