Blame view

src/Request/ParamsRequestImpl/Nodes/Params/ParamClbManualNodeClass.php 1.13 KB
944199fe   Benjamin Renard   Use table definit...
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
<?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);
966bd5f8   Benjamin Renard   Add request to ge...
34
		return $valueNode;
944199fe   Benjamin Renard   Use table definit...
35
36
37
38
39
40
	}
	
	public function getClbValues()
	{
		return $this->getChildrenByName(PARAMCLBMANUAL_VALUE);
	}
966bd5f8   Benjamin Renard   Add request to ge...
41
42
43
44
45
46
47
48
49
	
	public function loadFromNode($xmlNode)
	{
		$this->setClbName($this->getXmlNodeAttribute($xmlNode, PARAMCLBMANUAL_NAME));
		
		foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMCLBMANUAL_VALUE) as $clbXmlNode) {
			$this->addClbValue($this->getXmlNodeValue($clbXmlNode));
		}
	}
944199fe   Benjamin Renard   Use table definit...
50
51
52
}

?>