Mercurial > hg > ltpda
comparison m-toolbox/classes/@ltpda_uoh/ltpda_uoh.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children | bc767aaa99a8 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % LTPDA_UOH is the abstract ltpda base class for ltpda user object classes with history | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: LTPDA_UOH is the ltpda base class for ltpda user object classes | |
5 % This class is an abstract class and it is not possible to create | |
6 % an instance of this class. | |
7 % | |
8 % SUPER CLASSES: ltpda_uo < ltpda_obj | |
9 % | |
10 % SUB CLASSES: ao, filterbank, timespan, ssm, smodel, pest, matrix, collection, ltpda_tf | |
11 % | |
12 % LTPDA_UOH PROPERTIES: | |
13 % | |
14 % Protected Properties (read only) | |
15 % UUID - Universally Unique Identifier of 128-bit | |
16 % description - description of the object | |
17 % hist - history of the object (history object) | |
18 % mdlfile - model xml file of the LTPDAworkbench | |
19 % name - name of the object | |
20 % plotinfo - plist with the plot information | |
21 % procinfo - plist with additional information for an object. | |
22 % | |
23 % VERSION: $Id: ltpda_uoh.m,v 1.64 2011/09/16 04:59:23 hewitson Exp $ | |
24 % | |
25 % SEE ALSO: ltpda_obj, ltpda_uo, ltpda_tf, ltpda_filter, | |
26 % ao, miir, mfir, filterbank, timespan, pzmodel, history, ssm, | |
27 % parfrac, rational, smodel, pest, matrix, collection | |
28 % | |
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
30 | |
31 classdef (Hidden = true) ltpda_uoh < ltpda_uo | |
32 | |
33 | |
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
35 % Property definition % | |
36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
37 | |
38 %---------- Public (read/write) Properties ---------- | |
39 properties | |
40 end | |
41 | |
42 %---------- Protected read-only Properties ---------- | |
43 properties (SetAccess = protected) | |
44 hist = []; % history of the object (history object) | |
45 procinfo = []; % plist with additional information for an object. | |
46 plotinfo = []; % plist with the plot information | |
47 end | |
48 | |
49 %---------- Private Properties ---------- | |
50 properties (GetAccess = protected, SetAccess = protected) | |
51 end | |
52 | |
53 %---------- Abstract Properties ---------- | |
54 properties (Abstract = true, SetAccess = protected) | |
55 end | |
56 | |
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
58 % Check property setting % | |
59 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
60 | |
61 methods | |
62 function set.hist(obj, val) | |
63 if ~(isa(val, 'history') || isempty(val)) | |
64 error('### The value for the property ''hist'' must be\n### a history-object or empty but it is\n### from the class %s', class(val)); | |
65 end | |
66 obj.hist = val; | |
67 end | |
68 function set.procinfo(obj, val) | |
69 if ~isa(val, 'plist') && ~isempty(val) | |
70 error('### The value for the property ''procinfo'' should be a plist but it is from the class [%s]', class(val)); | |
71 end | |
72 if isempty(val) || nparams(val) == 0 | |
73 obj.procinfo = []; | |
74 else | |
75 obj.procinfo = val; | |
76 end | |
77 end | |
78 function set.plotinfo(obj, val) | |
79 if ~isa(val, 'plist') && ~isempty(val) | |
80 error('### The value for the property ''plotinfo'' should be a plist but it is from the class [%s]', class(val)); | |
81 end | |
82 if isempty(val) || nparams(val) == 0 | |
83 obj.plotinfo = []; | |
84 else | |
85 obj.plotinfo = val; | |
86 end | |
87 end | |
88 end | |
89 | |
90 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
91 % Constructor % | |
92 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
93 | |
94 methods | |
95 function obj = ltpda_uoh(varargin) | |
96 end | |
97 end | |
98 | |
99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
100 % Methods (protected) % | |
101 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
102 | |
103 methods (Access = protected) | |
104 varargout = setPropertyValue(varargin) | |
105 varargout = setObjectProperties(varargin) | |
106 varargout = addHistory(varargin) | |
107 varargout = addHistoryWoChangingUUID(varargin) | |
108 obj = fromFile(pbj, pli) | |
109 obj = fromRepository(obj, pli) | |
110 obj = fromLISO(obj, filename) | |
111 obj = fromDataInMAT(obj, data, filename) | |
112 obj = fromDatafile(obj, pli) | |
113 obj = fromComplexDatafile(obj, pli) | |
114 obj = fromModel(obj,pli) | |
115 obj = fromStruct(obj, a_struct) | |
116 varargout = fromDom(varargin) | |
117 varargout = csvGenerateData(varargin) | |
118 end | |
119 methods (Access = public) | |
120 varargout = setProperties(varargin) | |
121 end | |
122 | |
123 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
124 % Methods (public) % | |
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
126 | |
127 methods | |
128 varargout = index(varargin) | |
129 varargin = creator(varargin) | |
130 varargin = created(varargin) | |
131 | |
132 varargout = setPlotinfo(varargin) | |
133 varargout = setProcinfo(varargin) | |
134 varargout = csvexport(varargin) | |
135 end | |
136 | |
137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
138 % Methods (public, hidden) % | |
139 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
140 | |
141 methods (Hidden = true) | |
142 varargout = testCallerIsMethod(varargin) | |
143 varargout = clearHistory(varargin) | |
144 varargout = setHist(obj, val) | |
145 end | |
146 | |
147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
148 % Methods (static) % | |
149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
150 | |
151 methods (Static) | |
152 | |
153 varargout = update_struct(varargin); | |
154 | |
155 function ii = getInfo(varargin) | |
156 ii = utils.helper.generic_getInfo(varargin{:}, 'ltpda_uoh'); | |
157 end | |
158 | |
159 function out = VEROUT() | |
160 out = '$Id: ltpda_uoh.m,v 1.64 2011/09/16 04:59:23 hewitson Exp $'; | |
161 end | |
162 | |
163 function out = SETS() | |
164 out = SETS@ltpda_uo; | |
165 end | |
166 | |
167 function out = buildplist(out, set) | |
168 out = buildplist@ltpda_uo(out, set); | |
169 | |
170 switch lower(set) | |
171 end | |
172 end | |
173 | |
174 end | |
175 | |
176 methods (Static, Access=protected) | |
177 | |
178 | |
179 function pl = addGlobalKeys(pl) | |
180 % Name | |
181 p = param({'Name','The name of the constructed object.'}, paramValue.EMPTY_STRING); | |
182 pl.append(p); | |
183 | |
184 % Description | |
185 p = param({'Description','The description of the constructed object.'}, paramValue.EMPTY_STRING); | |
186 pl.append(p); | |
187 | |
188 % Plotinfo | |
189 p = param({'plotinfo',['The plot information for the constructed object. This information is interpreted by iplot. The value should be '... | |
190 'a plist with any or all of the following keys:<ul>'... | |
191 '<li>''linestyle'' - choose a MATLAB linestyle</li>'... | |
192 '<li>''linewidth'' - choose a the line width</li>'... | |
193 '<li>''color'' - choose a color for the resulting trace</li>'... | |
194 '<li>''marker'' - choose a marker for the resulting trace</li>'... | |
195 '<li>''legend_on'' - choose a true or false to include in the legend or not</li>'... | |
196 '</ul>']}, paramValue.EMPTY_DOUBLE); | |
197 pl.append(p); | |
198 | |
199 | |
200 end | |
201 | |
202 function pl = removeGlobalKeys(pl) | |
203 pl.remove('name'); | |
204 pl.remove('description'); | |
205 end | |
206 end | |
207 | |
208 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
209 % Methods (static) % | |
210 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
211 | |
212 methods (Static, Hidden) | |
213 end | |
214 | |
215 | |
216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
217 % Methods (abstract) % | |
218 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
219 | |
220 methods (Abstract) | |
221 varargout = generateConstructorPlist(varargin) | |
222 end | |
223 | |
224 end | |
225 |