2 * Config_WidgetReader.cpp
4 * Created on: Apr 2, 2014
8 #include <Config_WidgetReader.h>
9 #include <Config_Keywords.h>
11 #include <libxml\parser.h>
12 #include <libxml\tree.h>
13 #include <libxml\xpath.h>
14 #include <libxml\xmlstring.h>
21 Config_WidgetReader::Config_WidgetReader(const std::string& theXmlFile)
22 : Config_XMLReader(theXmlFile)
27 Config_WidgetReader::~Config_WidgetReader()
31 std::string Config_WidgetReader::featureWidgetCfg(std::string theFeatureName)
33 return myWidgetCache[theFeatureName];
36 void Config_WidgetReader::processNode(xmlNodePtr theNode)
38 if (isNode(theNode, NODE_FEATURE, NULL)) {
39 std::string result = "";
40 std::string aNodeName = getProperty(theNode, _ID);
41 if (hasChild(theNode)) {
42 xmlBufferPtr buffer = xmlBufferCreate();
43 int size = xmlNodeDump(buffer, theNode->doc, theNode, 0, 1);
44 result = std::string((char*) buffer->content);
46 myWidgetCache[aNodeName] = result;
50 bool Config_WidgetReader::processChildren(xmlNodePtr theNode)
52 return isNode(theNode, NODE_WORKBENCH, NODE_GROUP, NULL);