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

    function obj = mapptr(obj, RefMap)
%MAPPTR Re-map object pointer locations
%
%   OBJ = MAPPTR(OBJ, REFMAP) resets the addresses of the pointers held by
%   the object.  This method is mainly used during loading of the object.

%   Copyright 2006-2012 The MathWorks, Inc.

% Map the pointers held by the object
obj.tables = mapptr(obj.tables, RefMap);
obj.fillfactors = mapptr(obj.fillfactors, RefMap);
obj.normalizerlinks = mapptr(obj.normalizerlinks, RefMap);

for i=1:length(obj.filterfcns)
    if ~isempty(obj.filterfcns{i})
        obj.filterfcns{i} = mapptr(obj.filterfcns{i},RefMap);
    end
end