comparison m-toolbox/classes/@specwin/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 specwin 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 specwinNode = dom.createElement('specwin');
15 specwinNode.setAttribute('shape', sprintf('%dx%d', size(objs)));
16
17 % Call superclass
18 collectedHist = attachToDom@ltpda_nuo(obj, dom, specwinNode, collectedHist);
19
20 % Add type
21 childNode = dom.createElement('type');
22 utils.xml.attachCharToDom(obj.type, dom, childNode)
23 specwinNode.appendChild(childNode);
24
25 % Add alpha
26 childNode = dom.createElement('alpha');
27 utils.xml.attachNumberToDom(obj.alpha, dom, childNode)
28 specwinNode.appendChild(childNode);
29
30 % Add psll
31 childNode = dom.createElement('psll');
32 utils.xml.attachNumberToDom(obj.psll, dom, childNode)
33 specwinNode.appendChild(childNode);
34
35 % Add rov
36 childNode = dom.createElement('rov');
37 utils.xml.attachNumberToDom(obj.rov, dom, childNode)
38 specwinNode.appendChild(childNode);
39
40 % Add nenbw
41 childNode = dom.createElement('nenbw');
42 utils.xml.attachNumberToDom(obj.nenbw, dom, childNode)
43 specwinNode.appendChild(childNode);
44
45 % Add w3db
46 childNode = dom.createElement('w3db');
47 utils.xml.attachNumberToDom(obj.w3db, dom, childNode)
48 specwinNode.appendChild(childNode);
49
50 % Add flatness
51 childNode = dom.createElement('flatness');
52 utils.xml.attachNumberToDom(obj.flatness, dom, childNode)
53 specwinNode.appendChild(childNode);
54
55 % Add levelorder
56 childNode = dom.createElement('levelorder');
57 utils.xml.attachNumberToDom(obj.levelorder, dom, childNode)
58 specwinNode.appendChild(childNode);
59
60 % Add skip
61 childNode = dom.createElement('skip');
62 utils.xml.attachNumberToDom(obj.skip, dom, childNode)
63 specwinNode.appendChild(childNode);
64
65 % Add len
66 childNode = dom.createElement('len');
67 utils.xml.attachNumberToDom(obj.len, dom, childNode)
68 specwinNode.appendChild(childNode);
69
70 % Add to parent node
71 parent.appendChild(specwinNode);
72
73 end
74 end
75
76 end