X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_FeatureReader.h;h=8a976a59abc080014be38fbb3267f1b7a17e6377;hb=89682548b15252e424ffb9c1996cbeea1093b327;hp=005c9d7f2594fb791005a8cbfbbd3009d89b848a;hpb=9e869ede4d8c56262bb20534543c2bf56cd6a91b;p=modules%2Fshaper.git diff --git a/src/Config/Config_FeatureReader.h b/src/Config/Config_FeatureReader.h index 005c9d7f2..8a976a59a 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 * @@ -14,34 +16,40 @@ #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); - void fillFeature(xmlNodePtr theRoot, - const std::shared_ptr& outFeatureMessage); + /// 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); - void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute); - std::string restoreAttribute(xmlNodePtr theNode, const char* theNodeAttribute); - std::string restoreAttribute(const char* theNodeName, const char* theNodeAttribute); + /// Fills feature message + void fillFeature(xmlNodePtr theRoot, + const std::shared_ptr& outFeatureMessage); 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;