X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_FeatureReader.h;h=92a9d705fc630b2bc17ce1d5b387eb8a40e89c3f;hb=e97b8971af2bac1be9a67956de5ee4194f1fd10f;hp=468cb9911165f8c09faa902d6d0b55c23f317b53;hpb=587c5c1821f464e323eec057ba860b2433d4f412;p=modules%2Fshaper.git diff --git a/src/Config/Config_FeatureReader.h b/src/Config/Config_FeatureReader.h index 468cb9911..92a9d705f 100644 --- a/src/Config/Config_FeatureReader.h +++ b/src/Config/Config_FeatureReader.h @@ -10,32 +10,41 @@ #include #include +#include #include #include +#include class Config_FeatureMessage; -class Config_FeatureReader: public Config_XMLReader +class Config_FeatureReader : public Config_XMLReader { -public: - Config_FeatureReader(const std::string& theXmlFile, - const std::string& theLibraryName, + public: + Config_FeatureReader(const std::string& theXmlFile, const std::string& theLibraryName, const char* theEventGenerated = 0); virtual ~Config_FeatureReader(); std::list features() const; -protected: + protected: void processNode(xmlNodePtr aNode); bool processChildren(xmlNodePtr aNode); - void fillFeature(xmlNodePtr theRoot, Config_FeatureMessage& outFeatureMessage); + void fillFeature(xmlNodePtr theRoot, + const boost::shared_ptr& outFeatureMessage); bool isInternalFeature(xmlNodePtr theRoot); -private: - std::string myLastWorkbench; - std::string myLastGroup; + void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute); + std::string restoreAttribute(xmlNodePtr theNode, const char* theNodeAttribute); + std::string restoreAttribute(const char* theNodeName, const char* theNodeAttribute); + + private: + /// A map to store all parent's attributes. + /// The key has from "Node_Name:Node_Attribute" + std::map myParentAttributes; + //std::string myLastWorkbench; + //std::string myLastGroup; std::string myLibraryName; std::list myFeatures;