comparison m-toolbox/classes/@mfir/display.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 % DISPLAY overloads display functionality for mfir objects.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: DISPLAY overloads display functionality for mfir objects.
5 %
6 % CALL: txt = display(mfir)
7 %
8 % INPUT: mfir - IIR filter object
9 %
10 % OUTPUT: txt - cell array with strings to display the mfir object
11 %
12 % <a href="matlab:utils.helper.displayMethodInfo('mfir', 'display')">Parameters Description</a>
13 %
14 % VERSION: $Id: display.m,v 1.19 2011/04/08 08:56:20 hewitson Exp $
15 %
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
18 function varargout = display(varargin)
19
20 %%% Check if this is a call for parameters
21 if utils.helper.isinfocall(varargin{:})
22 varargout{1} = getInfo(varargin{3});
23 return
24 end
25
26 objs = utils.helper.collect_objects(varargin(:), 'mfir');
27
28 % get display text
29 txt = utils.helper.objdisp(objs);
30
31 if nargout == 0
32 for ii=1:length(txt)
33 disp(txt{ii});
34 end
35 else
36 varargout{1} = txt;
37 end
38 end
39
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41 % Local Functions %
42 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43
44 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45 %
46 % FUNCTION: getInfo
47 %
48 % DESCRIPTION: Get Info Object
49 %
50 % HISTORY: 11-07-07 M Hewitson
51 % Creation.
52 %
53 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54
55 function ii = getInfo(varargin)
56 if nargin == 1 && strcmpi(varargin{1}, 'None')
57 sets = {};
58 pl = [];
59 else
60 sets = {'Default'};
61 pl = getDefaultPlist;
62 end
63 % Build info object
64 ii = minfo(mfilename, 'mfir', 'ltpda', utils.const.categories.output, '$Id: display.m,v 1.19 2011/04/08 08:56:20 hewitson Exp $', sets, pl);
65 ii.setModifier(false);
66 ii.setOutmin(0);
67 end
68
69 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70 %
71 % FUNCTION: getDefaultPlist
72 %
73 % DESCRIPTION: Get Default Plist
74 %
75 % HISTORY: 11-07-07 M Hewitson
76 % Creation.
77 %
78 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79
80 function plout = getDefaultPlist()
81 persistent pl;
82 if exist('pl', 'var')==0 || isempty(pl)
83 pl = buildplist();
84 end
85 plout = pl;
86 end
87
88 function pl = buildplist()
89 pl = plist.EMPTY_PLIST;
90 end
91