Mercurial > hg > ltpda
comparison m-toolbox/classes/@pz/fromDom.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 obj = fromDom(obj, node, inhists) | |
3 | |
4 % Get shape | |
5 objShape = utils.xml.getShape(node); | |
6 | |
7 if any(objShape==0) | |
8 | |
9 obj = pz.initObjectWithSize(objShape(1), objShape(2)); | |
10 | |
11 else | |
12 | |
13 %%%%%%%%%% Call super-class | |
14 | |
15 fromDom@ltpda_nuo(obj, node, inhists); | |
16 | |
17 %%%%%%%%%% Get properties from the node attributes | |
18 | |
19 % Get f | |
20 obj.f = eval(utils.xml.mchar(node.getAttribute('f'))); | |
21 | |
22 % Get q | |
23 obj.q = eval(utils.xml.mchar(node.getAttribute('q'))); | |
24 | |
25 % Get ri | |
26 obj.ri = eval(utils.xml.mchar(node.getAttribute('ri'))); | |
27 | |
28 %%%%%%%%%% Get properties from the child nodes | |
29 | |
30 end | |
31 | |
32 end | |
33 |