ParamClbManualNodeClass.php
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
define ("PARAMCLBMANUAL_TAGNAME", "clbManual");
define ("PARAMCLBMANUAL_NAME", "name");
define ("PARAMCLBMANUAL_VALUE", "value");
/**
* @class ParamClbManualNodeClass
* @brief Definition of a manual calibration info for a parameter
* @details
*/
class ParamClbManualNodeClass extends NodeClass
{
public function __construct()
{
parent::__construct(PARAMCLBMANUAL_TAGNAME);
}
public function setClbName($name)
{
$this->setAttribute(PARAMCLBMANUAL_NAME, $name);
}
public function getClbName($name)
{
return $this->getAttribute(PARAMCLBMANUAL_NAME);
}
public function addClbValue($value)
{
$valueNode = new NodeClass(PARAMCLBMANUAL_VALUE);
$valueNode->setValue($value);
$this->addChild($valueNode);
return $valueNode;
}
public function getClbValues()
{
return $this->getChildrenByName(PARAMCLBMANUAL_VALUE);
}
public function loadFromNode($xmlNode)
{
$this->setClbName($this->getXmlNodeAttribute($xmlNode, PARAMCLBMANUAL_NAME));
foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMCLBMANUAL_VALUE) as $clbXmlNode) {
$this->addClbValue($this->getXmlNodeValue($clbXmlNode));
}
}
}
?>