Mercurial > hg > ltpda
comparison m-toolbox/classes/@pz/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 pz 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 pzNode = dom.createElement('pz'); | |
15 pzNode.setAttribute('shape', sprintf('%dx%d', size(objs))); | |
16 | |
17 % Call superclass | |
18 collectedHist = attachToDom@ltpda_nuo(obj, dom, pzNode, collectedHist); | |
19 | |
20 % Add f | |
21 pzNode.setAttribute('f', utils.xml.mat2str(obj.f)) | |
22 | |
23 % Add q | |
24 pzNode.setAttribute('q', utils.xml.mat2str(obj.q)) | |
25 | |
26 % Add ri | |
27 pzNode.setAttribute('ri', utils.xml.mat2str(obj.ri)) | |
28 | |
29 % Add to parent node | |
30 parent.appendChild(pzNode); | |
31 | |
32 end | |
33 end | |
34 | |
35 end |