/* * ErrorBarNode.cc * * Created on: July 22, 2014 * Author: AKKA */ #include "ErrorBarNode.hh" #include #include #include "NodeCfg.hh" #include "PlotLogger.hh" #include "SeriesProperties.hh" #include "ErrorBarProperties.hh" #include "CommonNode.hh" namespace plot { void ErrorMinMaxNode::proceed(xmlNodePtr pNode,const AMDA::Parameters::CfgContext& pContext_){ LOG4CXX_DEBUG(gLogger, "ErrorMinMaxNode::proceed"); ErrorBarProperties* errorBarProps = pContext_.get(); boost::shared_ptr errorMinMax(new ErrorMinMaxProperties ()); xmlChar* value = NULL; // -- paramMin if ((value = xmlGetProp(pNode, (const xmlChar *) "paramMin"))) { errorMinMax->setOriginalParamMin((const char*) value); xmlFree(value); } // -- paramMax if ((value = xmlGetProp(pNode, (const xmlChar *) "paramMax"))) { errorMinMax->setOriginalParamMax((const char*) value); xmlFree(value); } errorBarProps->setErrorMinMax(errorMinMax); // proceed children AMDA::XMLConfigurator::NodeGrpCfg::proceed(pNode, pContext_); } void ErrorDeltaNode::proceed(xmlNodePtr pNode,const AMDA::Parameters::CfgContext& pContext_){ LOG4CXX_DEBUG(gLogger, "ErrorDeltaNode::proceed"); ErrorBarProperties* errorBarProps = pContext_.get(); boost::shared_ptr errorDelta(new ErrorMinMaxProperties ()); xmlChar* value = NULL; // -- param if ((value = xmlGetProp(pNode, (const xmlChar *) "param"))) { errorDelta->setOriginalParamMin((const char*) value); errorDelta->setOriginalParamMax((const char*) value); xmlFree(value); } errorBarProps->setErrorMinMax(errorDelta); // proceed children AMDA::XMLConfigurator::NodeGrpCfg::proceed(pNode, pContext_); } void ErrorBarNode::proceed(xmlNodePtr pNode_,const AMDA::Parameters::CfgContext& pContext_){ LOG4CXX_DEBUG(gLogger, "ErrorBarNode::proceed"); DrawingProperties* props = pContext_.get(); ErrorBarProperties & ebProps = props->getErrorBarProperties(); // Push DrawingProperties & TimeTickProperties in a new context // before proceeding childs node AMDA::Parameters::CfgContext context; context.push (&ebProps); // proceed children AMDA::XMLConfigurator::NodeGrpCfg::proceed(pNode_, context); } } /* namespace plot */