X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_FeatureReader.h;h=409af6c7ec4270ae3db3e4d98f5f4a7a23c57339;hb=853e0eec6016120b641efa6adf427a239cf203cf;hp=76d7635c03c1ed970c1737765042a9f717b2f7b6;hpb=733ef3a952e2cd2d5df92667569eb9096200da27;p=modules%2Fshaper.git diff --git a/src/Config/Config_FeatureReader.h b/src/Config/Config_FeatureReader.h index 76d7635c0..409af6c7e 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,20 +10,52 @@ #ifndef CONFIG_FEATUREREADER_H_ #define CONFIG_FEATUREREADER_H_ +#include #include +#include + +#include +#include -class CONFIG_EXPORT Config_FeatureReader: public Config_XMLReader +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); + public: + /// 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: + /// Overloaded method. Defines how to process each node + virtual void processNode(xmlNodePtr aNode); + + /// Overloaded method. Clears attribute cache on exit 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); -protected: - void processNode(xmlNodePtr aNode); - bool processChildren(xmlNodePtr aNode); + /// Fills feature message + void fillFeature(xmlNodePtr theRoot, + const std::shared_ptr& outFeatureMessage); - void fillFeature(xmlNodePtr theRoot, Config_FeatureMessage& outFeatureMessage); + private: + std::string myLibraryName; + std::list myFeatures; + /// event generated on feature data sending, by default it is Config_FeatureMessage::GUI_EVENT() + const char* myEventGenerated; + bool myIsProcessWidgets; }; #endif /* CONFIG_FEATUREREADER_H_ */