2 * Config_WidgetReader.cpp
4 * Created on: Apr 2, 2014
8 #include <Config_WidgetReader.h>
9 #include <Config_Keywords.h>
10 #include <Config_Common.h>
12 #include <libxml/parser.h>
13 #include <libxml/tree.h>
14 #include <libxml/xpath.h>
15 #include <libxml/xmlstring.h>
22 Config_WidgetReader::Config_WidgetReader(const std::string& theXmlFile)
23 : Config_XMLReader(theXmlFile)
28 Config_WidgetReader::~Config_WidgetReader()
32 std::string Config_WidgetReader::featureWidgetCfg(std::string theFeatureName)
34 return myWidgetCache[theFeatureName];
37 void Config_WidgetReader::processNode(xmlNodePtr theNode)
39 if (isNode(theNode, NODE_FEATURE, NULL)) {
40 std::string result = "";
41 std::string aNodeName = getProperty(theNode, _ID);
42 if (hasChild(theNode)) {
43 xmlBufferPtr buffer = xmlBufferCreate();
44 int size = xmlNodeDump(buffer, theNode->doc, theNode, 0, 1);
45 result = std::string((char*) buffer->content);
47 myWidgetCache[aNodeName] = result;
51 bool Config_WidgetReader::processChildren(xmlNodePtr theNode)
53 return isNode(theNode, NODE_WORKBENCH, NODE_GROUP, NULL);