Blame view

src/XMLParameterConfigurator/CalibrationNode.cc 1.45 KB
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * CalibrationNode.cc
 *
 *  Created on: Dec 24, 2012
 *      Author: f.casimir
 */

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

#include "Config.hh"
#include "CalibrationInfoWriter.hh"
9517e2ec   Hacene SI HADJ MOHAND   ok test ok
13
#include "ServicesServer.hh"
fbe3c2bb   Benjamin Renard   First commit
14
15
16
17
18
19
20
21
22
23
24
25
26
27

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*>();
9f1b707e   Benjamin Renard   Fix tests used to...
28
		if (pNode->children && pNode->children->content && pNode->children->content[0] != '\0') {
9517e2ec   Hacene SI HADJ MOHAND   ok test ok
29
30
31
32
33
                                                           // plugin load 
                    std::string content  = (char *)(pNode->children->content); 
                    std::string plugin = content.substr(0, content.find("("));
                                        AMDA::Parameters::ServicesServer *servicesServer = AMDA::Parameters::ServicesServer::getInstance();
                    servicesServer->loadPlugin(plugin);
fbe3c2bb   Benjamin Renard   First commit
34
35
36
37
38
39
40
41
42
			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 */