Blame view

src/XMLParameterConfigurator/CalibrationNode.cc 1 KB
fbe3c2bb   Benjamin Renard   First commit
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
/*
 * CalibrationNode.cc
 *
 *  Created on: Dec 24, 2012
 *      Author: f.casimir
 */

#include "Parameter.hh"
#include "CalibrationNode.hh"

#include "Config.hh"
#include "CalibrationInfoWriter.hh"

using namespace AMDA::Parameters;

namespace AMDA {
namespace XMLParameterConfigurator {

	CalibrationNode::CalibrationNode() : NodeCfg() {
	}

	CalibrationNode::~CalibrationNode() {
	}

	void CalibrationNode::proceed(xmlNodePtr pNode, const AMDA::Parameters::CfgContext& pContext) {
		Parameter* lParameter = pContext.get<Parameter*>();
		if (pNode->children && pNode->children->content && pNode->children->content[0] != '0') {
			LOG4CXX_DEBUG(gLogger, "CalibrationNode::proceed push: " << (char*)pNode->children->content << " to Parameter: " << lParameter)
			CalibrationInfoWriter* lWriter = new  CalibrationInfoWriter();
			lWriter->setExpression((char*)pNode->children->content);
			lParameter->getCalibrationInfoWriterList().push_back(lWriter);
		}
	}

} /* namespace XMLParameterConfigurator */
} /* namespace AMDA */