X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHEXABLOCK%2FHexXmlTree.hxx;h=aca34b86284a303a409e03159d7563d64958f8f8;hb=6bc26b1701fc9bb16e44291f2dc4ab1b80525d8f;hp=ac65610474ca2829df5bdfd4a037f675e7934233;hpb=6b02c4b9784848b0a660e0e54f88447af8433c50;p=modules%2Fhexablock.git diff --git a/src/HEXABLOCK/HexXmlTree.hxx b/src/HEXABLOCK/HexXmlTree.hxx old mode 100755 new mode 100644 index ac65610..aca34b8 --- a/src/HEXABLOCK/HexXmlTree.hxx +++ b/src/HEXABLOCK/HexXmlTree.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2009-2012 CEA/DEN, EDF R&D +// Copyright (C) 2009-2023 CEA, EDF // // 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. +// 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 @@ -32,35 +32,35 @@ BEGIN_NAMESPACE_HEXA M_IDENT, M_EQUALS, M_STRING, M_COMMENT, M_END_COMMENT, M_PROLOG, M_END_PROLOG, M_ERROR}; -class XmlTree +class HexaExport XmlTree { public : - XmlTree (const string& name, XmlTree* dad=NULL); + XmlTree (const std::string& name, XmlTree* dad=NULL); ~XmlTree (); - int parseFile (const string& name); + int parseFile (const std::string& name); int parseStream (cpchar flux, int& posit); cpchar getName () { return item_name.c_str() ; } int getNbrAttributs () { return nbr_attributs ; } int getNbrChildren () { return nbr_items ; } - int findAttribute (const string& nom); - const string& findValue (const string& nom); - int findInteger (const string& nom); + int findAttribute (const std::string& nom); + const std::string& findValue (const std::string& nom); + int findInteger (const std::string& nom); cpchar getAttribute (int nro) { return tab_attributs [nro].c_str(); } cpchar getValue (int nro) { return tab_values [nro].c_str(); } - XmlTree* findChild (const string& nom); + XmlTree* findChild (const std::string& nom); XmlTree* getChild (int nro) { return tab_items [nro]; } XmlTree* getParent () { return xml_parent; } // ------------------------- Modifications - XmlTree* addChild (const string& nom); - void addAttribut (const string& nom, const string& valeur); - void setName (const string& nom) { item_name = nom; } + XmlTree* addChild (const std::string& nom); + void addAttribut (const std::string& nom, const std::string& valeur); + void setName (const std::string& nom) { item_name = nom; } void dump (int niveau=0); int goTo (cpchar ouca); @@ -68,25 +68,25 @@ public : private : int parseXml (); int readLine (); - EnumItem readItem (string& item); - EnumItem getItem (string& item, EnumItem waited=M_NONE); - int getString (string& item); - int getIdent (string& item); + EnumItem readItem (std::string& item); + EnumItem getItem (std::string& item, EnumItem waited=M_NONE); + int getString (std::string& item); + int getIdent (std::string& item); int getChar (); void putError (cpchar why); private : - string item_name; - string item_vide; + std::string item_name; + std::string item_vide; int nbr_attributs; int nbr_items; XmlTree* xml_parent; - vector tab_attributs; - vector tab_values; - vector tab_items; + std::vector tab_attributs; + std::vector tab_values; + std::vector tab_items; // Lecture - string fic_buffer; + std::string fic_buffer; int len_buffer; int nro_ligne; int fic_pos;