comparison m-toolbox/classes/@pzmodel/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 = pzmodel.initObjectWithSize(objShape(1), objShape(2));
10
11 else
12
13 %%%%%%%%%% Call super-class
14
15 fromDom@ltpda_tf(obj, node, inhists);
16
17 %%%%%%%%%% Get properties from the node attributes
18
19 %%%%%%%%%% Get properties from the child nodes
20
21 % Get poles
22 childNode = utils.xml.getChildByName(node, 'poles');
23 if ~isempty(childNode)
24 obj.poles = utils.xml.getObject(childNode, inhists);
25 end
26
27 % Get zeros
28 childNode = utils.xml.getChildByName(node, 'zeros');
29 if ~isempty(childNode)
30 obj.zeros = utils.xml.getObject(childNode, inhists);
31 end
32
33 % Get gain
34 childNode = utils.xml.getChildByName(node, 'gain');
35 if ~isempty(childNode)
36 bj.gain = utils.xml.getNumber(childNode);
37 end
38
39 % Get delay
40 childNode = utils.xml.getChildByName(node, 'delay');
41 if ~isempty(childNode)
42 obj.delay = utils.xml.getNumber(childNode);
43 end
44
45 end
46
47 end