comparison 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
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % SHOULDIGNORE True for plists which have the key 'ignore' with the value true.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: SHOULDIGNORE True for plists which have the key 'ignore'
5 % with the value true. In all other cases is the value false.
6 % A PLIST with 'ignore' equals to true will not be used for
7 % configuration inside methods.
8 % If you pass in only one input (even vectors and matrices)
9 % then get you back the results with the same size as the
10 % input otherwise as a row vector.
11 %
12 % CALL: out = isConfiguration(pls);
13 %
14 % <a href="matlab:utils.helper.displayMethodInfo('plist', 'shouldIgnore')">Parameters Description</a>
15 %
16 % VERSION: $Id: shouldIgnore.m,v 1.4 2011/04/08 08:56:21 hewitson Exp $
17 %
18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19
20 function varargout = shouldIgnore(varargin)
21
22 %%% Check if this is a call for parameters
23 if utils.helper.isinfocall(varargin{:})
24 varargout{1} = getInfo(varargin{3});
25 return
26 end
27
28 objs = utils.helper.collect_objects(varargin(:), 'plist');
29
30 out = zeros(size(objs));
31 for ii = 1:numel(objs)
32 if objs(ii).isparam('ignore') && objs(ii).find('ignore')
33 out(ii) = 1;
34 end
35 end
36
37 varargout{1} = out;
38
39 end
40
41 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 %
43 % FUNCTION: getInfo
44 %
45 % DESCRIPTION: Get Info Object
46 %
47 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48
49 function ii = getInfo(varargin)
50 if nargin == 1 && strcmpi(varargin{1}, 'None')
51 sets = {};
52 pl = [];
53 else
54 sets = {'Default'};
55 pl = getDefaultPlist;
56 end
57 % Build info object
58 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);
59 ii.setArgsmin(1);
60 end
61
62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 %
64 % FUNCTION: getDefaultPlist
65 %
66 % DESCRIPTION: Get Default Plist
67 %
68 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
69
70 function plo = getDefaultPlist()
71 plo = plist();
72 end