Mercurial > hg > ltpda
comparison m-toolbox/classes/@ltpda_uoh/setPropertyValue.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 % | |
2 % CALL: | |
3 % varargout = setPropertyValue(inputs, ... | |
4 % input_names, ... | |
5 % objectClass, ... | |
6 % callerIsMethod, ... | |
7 % propName, ... | |
8 % setterFcn, ... | |
9 % copy, ... | |
10 % getInfo) | |
11 % | |
12 % | |
13 function varargout = setPropertyValue(varargin) | |
14 | |
15 | |
16 % get inputs | |
17 callerIsMethod = varargin{end-4}; | |
18 propName = varargin{end-3}; | |
19 getInfo = varargin{end}; | |
20 | |
21 % Check if this is a call for parameters | |
22 if utils.helper.isinfocall(varargin{1:end-6}) | |
23 varargout{1} = getInfo(varargin{3}); | |
24 return | |
25 end | |
26 | |
27 % call super class method | |
28 [objects, values, pls, obj_invars] = setPropertyValue@ltpda_uo(varargin{:}); | |
29 | |
30 % Combine input plists and default PLIST | |
31 ii = getInfo('Default'); | |
32 pls = applyDefaults(ii.plists, pls); | |
33 | |
34 for jj = 1:numel(objects) | |
35 % Add history if needed | |
36 if ~callerIsMethod | |
37 if isempty(values) | |
38 plh = pls; | |
39 else | |
40 plh = pls.pset(propName, values{jj}); | |
41 end | |
42 objects(jj).addHistory(getInfo('None'), plh, obj_invars(jj), objects(jj).hist); | |
43 end | |
44 end | |
45 | |
46 % Set output | |
47 varargout{1} = objects; | |
48 end | |
49 % END |