www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@mdevproject/private/getDataDependancies.m

    function p = getDataDependancies(MP, pSSF, USE_PARENT)
% Get the list of data pointers from the mdevproject

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



% By Default USE_PARENT
if nargin < 3
    USE_PARENT = true;
end

dlist =  MP.Datalist;
p = [];
levels = [];
% Normally the parent is this pSSF
pParent = pSSF;
% However if this dataset is an original then it is possible that the underlying
% sweepset has also changed. Hence that is the parent
if USE_PARENT
	pParent = pSSF.dataptr;
end
% Find all the children
for i = 1:length(dlist)
	[OK, level] = isChild(dlist(i).info, pParent);
	if OK
		p = [p dlist(i)];
		levels = [levels level];
	end
end
% Sort them in order of distance from the parent
[levels, i] = sort(levels);
p = p(i);
% Is pSSF in this list (as a child of a sweepset?). If so remove it
p = p(~ismember(double(p), double(pSSF)));