Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Loading of SketchSolver plugin example.
[modules/shaper.git]
/
src
/
Config
/
Config_FeatureReader.cpp
diff --git
a/src/Config/Config_FeatureReader.cpp
b/src/Config/Config_FeatureReader.cpp
index bb52b413fa964c3ecdf95c9b275ddd4a6a7b2fe6..78e485e912d1b5e294d160c57b380e57273aff39 100644
(file)
--- a/
src/Config/Config_FeatureReader.cpp
+++ b/
src/Config/Config_FeatureReader.cpp
@@
-9,8
+9,8
@@
#include <Config_Common.h>
#include <Config_FeatureMessage.h>
#include <Config_FeatureReader.h>
#include <Config_Common.h>
#include <Config_FeatureMessage.h>
#include <Config_FeatureReader.h>
-#include <Event_Message.h>
-#include <Event_Loop.h>
+#include <Event
s
_Message.h>
+#include <Event
s
_Loop.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
@@
-28,7
+28,7
@@
Config_FeatureReader::Config_FeatureReader(const std::string& theXmlFile,
const char* theEventGenerated)
: Config_XMLReader(theXmlFile),
myLibraryName(theLibraryName),
const char* theEventGenerated)
: Config_XMLReader(theXmlFile),
myLibraryName(theLibraryName),
- myEventGenerated(theEventGenerated ? theEventGenerated :
"FeatureEvent"
)
+ myEventGenerated(theEventGenerated ? theEventGenerated :
EVENT_FEATURE_LOADED
)
{
}
{
}
@@
-36,13
+36,21
@@
Config_FeatureReader::~Config_FeatureReader()
{
}
{
}
+std::list<std::string> Config_FeatureReader::features() const
+{
+ return myFeatures;
+}
+
void Config_FeatureReader::processNode(xmlNodePtr theNode)
{
void Config_FeatureReader::processNode(xmlNodePtr theNode)
{
- Event
_ID aMenuItemEvent = Event
_Loop::eventByName(myEventGenerated);
+ Event
s_ID aMenuItemEvent = Events
_Loop::eventByName(myEventGenerated);
if (isNode(theNode, NODE_FEATURE, NULL)) {
if (isNode(theNode, NODE_FEATURE, NULL)) {
- Event
_Loop* aEvLoop = Event
_Loop::loop();
+ Event
s_Loop* aEvLoop = Events
_Loop::loop();
Config_FeatureMessage aMessage(aMenuItemEvent, this);
fillFeature(theNode, aMessage);
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);
}
//The m_last* variables always defined before fillFeature() call. XML is a tree.
aEvLoop->send(aMessage);
}
//The m_last* variables always defined before fillFeature() call. XML is a tree.
@@
-52,6
+60,8
@@
void Config_FeatureReader::processNode(xmlNodePtr theNode)
if (isNode(theNode, NODE_WORKBENCH, NULL)) {
myLastWorkbench = getProperty(theNode, _ID);
}
if (isNode(theNode, NODE_WORKBENCH, NULL)) {
myLastWorkbench = getProperty(theNode, _ID);
}
+ //Process SOURCE nodes.
+ Config_XMLReader::processNode(theNode);
}
bool Config_FeatureReader::processChildren(xmlNodePtr theNode)
}
bool Config_FeatureReader::processChildren(xmlNodePtr theNode)
@@
-69,4
+79,5
@@
void Config_FeatureReader::fillFeature(xmlNodePtr theRoot, Config_FeatureMessage
outFtMessage.setGroupId(myLastGroup);
outFtMessage.setWorkbenchId(myLastWorkbench);
outFtMessage.setPluginLibrary(myLibraryName);
outFtMessage.setGroupId(myLastGroup);
outFtMessage.setWorkbenchId(myLastWorkbench);
outFtMessage.setPluginLibrary(myLibraryName);
+ outFtMessage.setNestedFeatures(getProperty(theRoot, FEATURE_NESTED));
}
}