view m-toolbox/classes/@LTPDAworkbench/objs2pipeline.m @ 51:9d5c88356247 database-connection-manager

Make unit tests database connection parameters configurable
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:24:37 +0100
parents f0afece42f48
children
line wrap: on
line source

% OBJS2PIPELINE builds new pipelines in the given workbench from the
% history of the input objects.
%
% CALL: objs2pipeline(wb, objs)
%
% M Hewitson 12-11-10
%
% $Id: objs2pipeline.m,v 1.2 2010/08/06 19:10:49 ingo Exp $
%
function objs2pipeline(wb, objs)
  
  % loop over input objects
  for oo=1:numel(objs)
    % get the history object
    hist = objs(oo).hist;
    % get a list of commands
    cmds = hist2m(hist);
    % and discard the first and reorder
    cmds = cmds(end:-1:2);
    % create new diagram
    wb.cmds2pipeline(objs(oo).name, cmds);
  end % end loop over objects
  
end