comparison m-toolbox/classes/@miir/attachToDom.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 function collectedHist = attachToDom(objs, dom, parent, collectedHist)
3
4 if isempty(objs)
5
6 % Create empty miir node with the attribute 'shape'
7 utils.xml.attachEmptyObjectNode(objs, dom, parent);
8
9 else
10 for oo = 1:numel(objs)
11 obj = objs(oo);
12
13 % Create object node
14 miirNode = dom.createElement('miir');
15 miirNode.setAttribute('shape', sprintf('%dx%d', size(objs)));
16
17 % Call superclass
18 collectedHist = attachToDom@ltpda_filter(obj, dom, miirNode, collectedHist);
19
20 % Add b
21 bNode = dom.createElement('b');
22 utils.xml.attachNumberToDom(obj.b, dom, bNode);
23 miirNode.appendChild(bNode);
24
25 % Add histout
26 histinNode = dom.createElement('histin');
27 utils.xml.attachNumberToDom(obj.histin, dom, histinNode);
28 miirNode.appendChild(histinNode);
29
30 % Add to parent node
31 parent.appendChild(miirNode);
32
33 end
34 end
35
36 end