X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHEXABLOCK%2FHexEltBase.cxx;h=41a4aebe480fbfd8daa6010acf69828b532922fc;hb=f7c6169bde92dd9e0fe05f20f97156d47ee3b37b;hp=dcad17da716c3a1dbf1fc6410d8b4caf34125d88;hpb=6b02c4b9784848b0a660e0e54f88447af8433c50;p=modules%2Fhexablock.git diff --git a/src/HEXABLOCK/HexEltBase.cxx b/src/HEXABLOCK/HexEltBase.cxx old mode 100755 new mode 100644 index dcad17d..41a4aeb --- a/src/HEXABLOCK/HexEltBase.cxx +++ b/src/HEXABLOCK/HexEltBase.cxx @@ -1,12 +1,12 @@ // C++ : Element de base -// Copyright (C) 2009-2012 CEA/DEN, EDF R&D +// Copyright (C) 2009-2022 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. +// 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 @@ -80,7 +80,8 @@ void EltBase::remove () return; el_root->setDeprecated (2); - el_type = EL_REMOVED; + el_type = EL_REMOVED; + el_status = HERR; int nbp = el_parent.size(); for (int nro=0 ; nrosetDeprecated (2); - el_type = EL_REMOVED; + el_type = EL_REMOVED; + el_status = HERR; } // ========================================================= getName cpchar EltBase::getName () @@ -126,14 +128,9 @@ void EltBase::printName (cpchar sep) // ========================================================= dumpRef void EltBase::dumpRef () { - int nbp = el_parent.size(); + int nbp = el_parent.size(); bool prems = true; - if (nbp==0) - { - printf ("\n"); - } - for (int nro=0 ; nroisHere ()) @@ -163,9 +160,10 @@ void EltBase::setId (int ln) // ========================================================= makeVarName char* EltBase::makeVarName (char* nom) { - static cpchar PREFIX[] = {"Undef", "Node", "Edge", "Quad", "Hexa", - "Vect", "Grid", "Cyl", "Pipe", "Group", "Law", - "Xxxx", "Xxxx", "Xxxx" }; + static cpchar PREFIX [EL_MAXI] = {"undef", "ver", "edge", "quad", "hexa", + "vect", "grid", "cyl", "pipe", "group", + "law", "shape", "subsh", "prop", + "doc", "Xxxx" }; sprintf (nom, "%s%d", PREFIX[el_type], el_id); return nom; } @@ -174,5 +172,15 @@ bool EltBase::debug (int niv) { return el_root != NULL && el_root->getLevel() > niv ; } +// ========================================================= getNextName +std::string EltBase::getNextName () +{ + if (el_root != NULL) + return el_root->getNextName (el_type); + + char name [16]; + makeName (el_type, 0, name); + return std::string (name); +} END_NAMESPACE_HEXA