/* * StatusPlotNode.cc * * Created on: 12 janv. 2015 * Author: AKKA */ #include "StatusPlotNode.hh" #include "PanelPlotNodeRegistry.hh" #include "StatusPlot.hh" #include "PlotLogger.hh" #include "ParamsNode.hh" #include "PlotOutput.hh" #include "PlotCommon.hh" #include "NodeCfg.hh" #include "StatusBarDecorator.hh" #include "Time/TimePlot.hh" #include namespace plot { const std::string StatusPlotNode::NODENAME = STATUSPLOT_NODENAME; std::string StatusPlotNode::_key = PanelPlotNodeRegistry::getInstance().addElement(NODENAME, boost::shared_ptr(new StatusPlotNode())); StatusPlotNode::StatusPlotNode() : AbstractDecoratorPlotNode() { } StatusPlotNode::~StatusPlotNode() { } boost::shared_ptr StatusPlotNode::createPlot(AMDA::Parameters::ParameterManager& manager, boost::shared_ptr panel, bool isStandalone) { LOG4CXX_DEBUG(gLogger, "StatusPlotNode::createPlot"); return boost::shared_ptr(new StatusPlot(manager, panel, isStandalone)); } void StatusPlotNode::parseAttributes(xmlNodePtr xmlNode_, boost::shared_ptr plot) { LOG4CXX_DEBUG(gLogger, "StatusPlotNode::parseAttributes"); // parse optional attribute : xmlChar* value = NULL; // colorMapIndex attribute value = xmlGetProp(xmlNode_, (const xmlChar *) "colorMapIndex"); if (value != nullptr) { StatusBarDecorator *sbd = static_cast(plot->getTimeAxisDecorator().get()); sbd->setColorMapIndex(atoi((const char*) value)); xmlFree(value); } // position attribute value = xmlGetProp(xmlNode_, (const xmlChar *) "position"); if (value != nullptr) { PlotCommon::Position position; PlotCommon::setPosition((const char*) value, position); StatusBarDecorator *sbd = static_cast(plot->getTimeAxisDecorator().get()); sbd->setBarPosition(position); xmlFree(value); } } } /* namespace plot */