X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_FeatureReader.h;h=a0952ec1b69afacf95a44f43140848447b084bef;hb=817439b17505a397a77d29308faf277611a341c9;hp=f7547785ce39c245a18bbf8e381018351b2a4b4c;hpb=8dc74f82810d5f597b78633b457efb0ef4f89f9f;p=modules%2Fshaper.git diff --git a/src/Config/Config_FeatureReader.h b/src/Config/Config_FeatureReader.h index f7547785c..a0952ec1b 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 * @@ -10,36 +12,50 @@ #include #include +#include #include #include class Config_FeatureMessage; +/*! + * \class Config_FeatureReader + * \ingroup Config + * \brief Class to process feature's xml definition. + */ class Config_FeatureReader : public Config_XMLReader { public: - Config_FeatureReader(const std::string& theXmlFile, const std::string& theLibraryName, + /// Constructor + Config_FeatureReader(const std::string& theXmlFile, + const std::string& theLibraryName, const char* theEventGenerated = 0); virtual ~Config_FeatureReader(); - + /// Returns list of all features defined in reader's file std::list features() const; protected: - void processNode(xmlNodePtr aNode); - bool processChildren(xmlNodePtr aNode); + /// Overloaded method. Defines how to process each node + virtual void processNode(xmlNodePtr aNode); + + /// Overloaded method. Clears attribute cache on extit from attribute's node + virtual void cleanup(xmlNodePtr aNode); + + /// Overloaded method. Defines if the given node should be parsed recursively + virtual bool processChildren(xmlNodePtr aNode); - void fillFeature(xmlNodePtr theRoot, Config_FeatureMessage& outFeatureMessage); - bool isInternalFeature(xmlNodePtr theRoot); + /// Fills feature message + void fillFeature(xmlNodePtr theRoot, + const std::shared_ptr& outFeatureMessage); private: - std::string myLastWorkbench; - std::string myLastGroup; std::string myLibraryName; std::list myFeatures; - /// event generated on feature data sending, by default it is EVENT_FEATURE_LOADED + /// event generated on feature data sending, by default it is Config_FeatureMessage::GUI_EVENT() const char* myEventGenerated; + bool myIsProcessWidgets; }; #endif /* CONFIG_FEATUREREADER_H_ */