Mercurial > hg > ltpda
comparison m-toolbox/classes/@LTPDAworkbench/appendPlist.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 % APPENDPLIST appends the input plist to the plist of the given block. | |
2 % | |
3 % CALL: wb.appendPlist(blockname, pl) | |
4 % | |
5 % M Hewitson 13-11-08 | |
6 % | |
7 % $Id: appendPlist.m,v 1.2 2010/08/06 19:10:48 ingo Exp $ | |
8 % | |
9 function appendPlist(wb, blockname, varargin) | |
10 | |
11 % Parse inputs | |
12 if isa(varargin{1}, 'plist') | |
13 apl = varargin{1}; | |
14 else | |
15 error('### Unknown inputs.'); | |
16 end | |
17 | |
18 % get the block with this name | |
19 b = awtinvoke(wb.mp, 'getBlockByName', blockname); | |
20 | |
21 % Convert the plist to a java plist | |
22 pl = LTPDAworkbench.jpl2mpl(b.getPlist()); | |
23 pl.combine(apl); | |
24 | |
25 % Convert the plist to a java plist | |
26 jpl = LTPDAworkbench.mpl2jpl(pl); | |
27 | |
28 % set the plist | |
29 b.setPlist(jpl); | |
30 end |