Mercurial > hg > ltpda
view m-toolbox/classes/@ssmblock/addPorts.m @ 35:4be5f7a5316f database-connection-manager
Suppress output messages on preferences loading and saving
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% ADDPORTS adds the given ssm ports to the list of ports. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: ADDPORTS adds the given ssm ports to the list of ports. % % The given ports are added to the list of ports. No check is done to ensure % the ports remain unique. Instead you should check with % ssmblock.containsPort before adding the ports. % % CALL: block = addPorts(ssmblocks, ports) % % VERSION: $Id: addPorts.m,v 1.4 2011/04/08 08:56:31 hewitson Exp $ % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function varargout = addPorts(varargin) warning('This function is outdated and will be deleted') [blocks, invars, rest] = utils.helper.collect_objects(varargin(:), 'ssmblock'); ports = utils.helper.collect_objects(rest, 'ssmport'); % copy or modify outblocks = copy(blocks, nargout); % loop over blocks for kk=1:numel(blocks) block = blocks(kk); block.ports = [block.ports copy(ports,1)]; end if nargout > 0 varargout{1} = outblocks; end end