Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / Config / Config_FeatureReader.cpp
index 50d72e99230ebcc07bf48e30e017140644a6d25d..2fd10770ef396d5a8db5fe66eedcfba3955cc821 100644 (file)
@@ -9,8 +9,8 @@
 #include <Config_Common.h>
 #include <Config_FeatureMessage.h>
 #include <Config_FeatureReader.h>
-#include <Event_Message.h>
-#include <Event_Loop.h>
+#include <Events_Message.h>
+#include <Events_Loop.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
@@ -36,13 +36,19 @@ Config_FeatureReader::~Config_FeatureReader()
 {
 }
 
+std::list<std::string> Config_FeatureReader::features() const
+{
+  return myFeatures;
+}
+
 void Config_FeatureReader::processNode(xmlNodePtr theNode)
 {
-  Event_ID aMenuItemEvent = Event_Loop::eventByName(myEventGenerated);
+  Events_ID aMenuItemEvent = Events_Loop::eventByName(myEventGenerated);
   if (isNode(theNode, NODE_FEATURE, NULL)) {
-    Event_Loop* aEvLoop = Event_Loop::loop();
+    Events_Loop* aEvLoop = Events_Loop::loop();
     Config_FeatureMessage aMessage(aMenuItemEvent, this);
     fillFeature(theNode, aMessage);
+    myFeatures.push_back(getProperty(theNode, _ID));
     //If a feature has xml definition for it's widget:
     aMessage.setUseInput(hasChild(theNode));
     aEvLoop->send(aMessage);
@@ -54,6 +60,8 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
   if (isNode(theNode, NODE_WORKBENCH, NULL)) {
     myLastWorkbench = getProperty(theNode, _ID);
   }
+  //Process SOURCE nodes.
+  Config_XMLReader::processNode(theNode);
 }
 
 bool Config_FeatureReader::processChildren(xmlNodePtr theNode)