view m-toolbox/classes/@plist/shouldIgnore.m @ 0:f0afece42f48
Import.
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Wed, 23 Nov 2011 19:22:13 +0100 (2011-11-23)
parents
children
line source
+ − % SHOULDIGNORE True for plists which have the key 'ignore' with the value true.
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − %
+ − % DESCRIPTION: SHOULDIGNORE True for plists which have the key 'ignore'
+ − % with the value true. In all other cases is the value false.
+ − % A PLIST with 'ignore' equals to true will not be used for
+ − % configuration inside methods.
+ − % If you pass in only one input (even vectors and matrices)
+ − % then get you back the results with the same size as the
+ − % input otherwise as a row vector.
+ − %
+ − % CALL: out = isConfiguration(pls);
+ − %
+ − % <a href="matlab:utils.helper.displayMethodInfo('plist', 'shouldIgnore')">Parameters Description</a>
+ − %
+ − % VERSION: $Id: shouldIgnore.m,v 1.4 2011/04/08 08:56:21 hewitson Exp $
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ −
+ − function varargout = shouldIgnore(varargin)
+ −
+ − %%% Check if this is a call for parameters
+ − if utils.helper.isinfocall(varargin{:})
+ − varargout{1} = getInfo(varargin{3});
+ − return
+ − end
+ −
+ − objs = utils.helper.collect_objects(varargin(:), 'plist');
+ −
+ − out = zeros(size(objs));
+ − for ii = 1:numel(objs)
+ − if objs(ii).isparam('ignore') && objs(ii).find('ignore')
+ − out(ii) = 1;
+ − end
+ − end
+ −
+ − varargout{1} = out;
+ −
+ − end
+ −
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − %
+ − % FUNCTION: getInfo
+ − %
+ − % DESCRIPTION: Get Info Object
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ −
+ − function ii = getInfo(varargin)
+ − if nargin == 1 && strcmpi(varargin{1}, 'None')
+ − sets = {};
+ − pl = [];
+ − else
+ − sets = {'Default'};
+ − pl = getDefaultPlist;
+ − end
+ − % Build info object
+ − ii = minfo(mfilename, 'plist', 'ltpda', utils.const.categories.internal, '$Id: shouldIgnore.m,v 1.4 2011/04/08 08:56:21 hewitson Exp $', sets, pl);
+ − ii.setArgsmin(1);
+ − end
+ −
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − %
+ − % FUNCTION: getDefaultPlist
+ − %
+ − % DESCRIPTION: Get Default Plist
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ −
+ − function plo = getDefaultPlist()
+ − plo = plist();
+ − end