X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_FeatureReader.h;h=015090889c6cd075c05bc33a9a535b0e7dd85d22;hb=aa941d4038c5880146ea98adc84e5d02fc729c49;hp=7f7889aaabfbd07fe0ab741f22162b226c354765;hpb=d0e122f8a53eee773269e778db3115c36070dbf1;p=modules%2Fshaper.git diff --git a/src/Config/Config_FeatureReader.h b/src/Config/Config_FeatureReader.h index 7f7889aaa..015090889 100644 --- a/src/Config/Config_FeatureReader.h +++ b/src/Config/Config_FeatureReader.h @@ -1,11 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -/* - * Config_FeatureReader.h - * - * Created on: Mar 20, 2014 - * Author: sbh - */ +// Copyright (C) 2014-2021 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef CONFIG_FEATUREREADER_H_ #define CONFIG_FEATUREREADER_H_ @@ -16,7 +26,6 @@ #include #include -#include class Config_FeatureMessage; @@ -39,25 +48,18 @@ class Config_FeatureReader : public Config_XMLReader 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); /// Fills feature message - void fillFeature(xmlNodePtr theRoot, + void fillFeature(xmlNodePtr theRoot, const std::shared_ptr& outFeatureMessage); - /// Stores an attribute in internal map for later use. - /// Key is "Node_Name:Node_Attribute" and value is getProperty(theNodeAttribute) - void storeAttribute(xmlNodePtr theNode, const char* theNodeAttribute); - /// Restores an attribute from internal map. - std::string restoreAttribute(xmlNodePtr theNode, const char* theNodeAttribute); - /// Restores an attribute from internal map. - 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 myLibraryName; std::list myFeatures;