/* * SymbolNode.cc * * Created on: Dec 5, 2013 * Author: amdadev */ #ifndef SYMBOLNODE_CC_ #define SYMBOLNODE_CC_ #include #include #include "AbstractSymbolNode.hh" #include "NodeCfg.hh" #include "PlotLogger.hh" #include "CommonNode.hh" namespace plot { void AbstractSymbolNode::proceed(xmlNodePtr pNode_, const AMDA::Parameters::CfgContext& context_) { LOG4CXX_DEBUG(gLogger, "AbstractSymbolNode::proceed"); // std::cout << "reading symbol node..." << std::endl; SymbolProperties &pProps = getSymbolProperties (context_); // read attributes : xmlChar* value = NULL; // default values comes from parent drawing properties // overwrites default values if any... // type value = xmlGetProp(pNode_, (const xmlChar *) "type"); if (value) { try { pProps.setType(stoSymbolType.at( std::string((const char*) value))); } catch (std::out_of_range& err) { std::ostringstream msg { }; msg << "SymbolNode::proceed invalid SymbolType value:" << value << ". Using default value."; LOG4CXX_DEBUG(gLogger, msg.str()); } xmlFree(value); } // size value = xmlGetProp(pNode_, (const xmlChar *) "size"); if (value) { pProps.setSize( atoi((const char*) value) ); xmlFree(value); } // color attributes : updateColor(pProps.getColor(),pNode_,(const xmlChar*)"color", (const xmlChar*)"colorMapIndex" ); // std::cout << "Symbol node read." << std::endl; } } /* namespace plot */ #endif /* SYMBOLNODE_CC_ */