ParamGetDDBaseNodeClass.php
1.32 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
require_once "ParamGetDDBaseBaseParamNodeClass.php";
define ("PARAMGETDDBASE_NAME", "vi");
define ("PARAMGETDDBASE_NAMEATT", "name");
/**
* @class ParamGetAmdaParamNodeClass
* @brief Definition of a ddbase getter for AMDA_Kernel
* @details
*/
class ParamGetDDBaseNodeClass extends NodeClass
{
public function __construct()
{
parent::__construct(PARAMGETDDBASE_NAME);
}
public function setVIName($name)
{
$this->setAttribute(PARAMGETDDBASE_NAMEATT, $name);
}
public function getVIName()
{
return $this->getAttribute(PARAMGETDDBASE_NAMEATT);
}
public function addBaseParam($name = "", $calib_info_list = array(), $tensor_order = -1)
{
$baseParamNode = new ParamGetDDBaseBaseParamNodeClass();
$baseParamNode->setParamName($name);
if ($tensor_order > -1)
$baseParamNode->setTensorOrder($tensor_order);
foreach ($calib_info_list as $calib_info)
$baseParamNode->addCalibInfo($calib_info);
$this->addChild($baseParamNode);
return $baseParamNode;
}
public function loadFromNode($xmlNode)
{
$this->setVIName($this->getXmlNodeAttribute($xmlNode, PARAMGETDDBASE_NAMEATT));
foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMGETDDBASEBASEPARAM_NAME) as $baseParamXmlNode) {
$this->addBaseParam()->loadFromNode($baseParamXmlNode);
}
}
}
?>