CalibrationNode.cc
1.45 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
/*
* CalibrationNode.cc
*
* Created on: Dec 24, 2012
* Author: f.casimir
*/
#include "Parameter.hh"
#include "CalibrationNode.hh"
#include "Config.hh"
#include "CalibrationInfoWriter.hh"
#include "ServicesServer.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') {
// 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);
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 */