X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_FeatureReader.h;h=eec7889b01df91ee00b815a8373929d4956f8b9a;hb=ea9b3a766e6401626c170e3ae5f591f67af22271;hp=12517a5df395849fdaeac3753325411305347047;hpb=e0599afe13a8f2be4fe593e6d50b23a23b0a6c81;p=modules%2Fshaper.git diff --git a/src/Config/Config_FeatureReader.h b/src/Config/Config_FeatureReader.h index 12517a5df..eec7889b0 100644 --- a/src/Config/Config_FeatureReader.h +++ b/src/Config/Config_FeatureReader.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + /* * Config_FeatureReader.h * @@ -8,38 +10,46 @@ #ifndef CONFIG_FEATUREREADER_H_ #define CONFIG_FEATUREREADER_H_ -#include +#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 std::shared_ptr& outFeatureMessage); + + 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: - std::string myLastWorkbench; - std::string myLastGroup; + private: + /// A map to store all parent's attributes. + /// The key has from "Node_Name:Node_Attribute" + std::map myParentAttributes; std::string myLibraryName; std::list myFeatures; - /// event generated on feature data sending, by default it is "FeatureEvent" + /// event generated on feature data sending, by default it is Config_FeatureMessage::GUI_EVENT() const char* myEventGenerated; + bool myIsProcessWidgets; }; #endif /* CONFIG_FEATUREREADER_H_ */