X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Gen_i_1.cxx;h=b19214c452620f96e3d3217d437022ebcbacbd5e;hb=refs%2Ftags%2FV6_3_0_public;hp=2b216fe268d77330f4480a45880151cf4f2ecf69;hpb=44f899d82d8ca798298c74b30e01cc6caaf4307f;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index 2b216fe26..b19214c45 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -1,31 +1,30 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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. +// 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. // -// 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. +// 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 +// 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 -// -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses -// File : SMESH_Gen_i_1.cxx -// Created : Thu Oct 21 17:24:06 2004 -// Author : Edward AGAPOV (eap) -// Module : SMESH -// $Header: +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File : SMESH_Gen_i_1.cxx +// Created : Thu Oct 21 17:24:06 2004 +// Author : Edward AGAPOV (eap) +// Module : SMESH +// $Header : $ + #include "SMESH_Gen_i.hxx" #include "SMESH_Mesh_i.hxx" @@ -922,7 +921,30 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP if(!hasAttr) aNewParams = anInputParams; else - aNewParams = aOldParameters+"|"+anInputParams; + { + int pos = aOldParameters.SearchFromEnd("|"); + if(pos==-1) pos = 0; + TCollection_AsciiString previousParamFull(aOldParameters.Split(pos)); + TCollection_AsciiString previousParam(previousParamFull); + TCollection_AsciiString theRepet("1"); + pos = previousParam.SearchFromEnd(";*="); + if(pos >= 0) + { + theRepet = previousParam.Split(pos+2); + pos = pos-1; + if(pos==-1) pos = 0; + previousParam.Split(pos); + } + if(previousParam == anInputParams) + { + theRepet = theRepet.IntegerValue()+1; + aNewParams = aOldParameters + previousParam + ";*=" + theRepet; + } + else + { + aNewParams = aOldParameters + previousParamFull + "|" + anInputParams; + } + } if(VARIABLE_DEBUG) {