X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers_I%2FStdMeshers_MaxLength_i.cxx;h=85077ee16dfdd62f6a0718ee7558daa0178a4727;hb=ea6d39162cc87522ef869b97a6b4be8bd41776d5;hp=bbed6c448ac82f49f3542fccfaa426c7e0c494a5;hpb=0635c9fc80f67d1e5dc0e94ec85f487286a92070;p=modules%2Fsmesh.git diff --git a/src/StdMeshers_I/StdMeshers_MaxLength_i.cxx b/src/StdMeshers_I/StdMeshers_MaxLength_i.cxx index bbed6c448..85077ee16 100644 --- a/src/StdMeshers_I/StdMeshers_MaxLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MaxLength_i.cxx @@ -1,27 +1,26 @@ -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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 // -// Copyright (C) 2003 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 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 // + +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MaxLength_i.cxx // Module : SMESH - +// #include "StdMeshers_MaxLength_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" @@ -43,13 +42,11 @@ using namespace std; //============================================================================= StdMeshers_MaxLength_i::StdMeshers_MaxLength_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_MaxLength( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } @@ -81,11 +78,11 @@ void StdMeshers_MaxLength_i::SetLength( CORBA::Double theLength ) } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), - SALOME::BAD_PARAM ); + SALOME::BAD_PARAM ); } // Update Python script - SMESH::TPythonDump() << _this() << ".SetLength( " << theLength << " )"; + SMESH::TPythonDump() << _this() << ".SetLength( " << SMESH::TVar(theLength) << " )"; } //============================================================================= @@ -102,7 +99,7 @@ void StdMeshers_MaxLength_i::SetUsePreestimatedLength( CORBA::Boolean toUse ) } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), - SALOME::BAD_PARAM ); + SALOME::BAD_PARAM ); } // this is an internal kitchen call - no Python dump @@ -123,7 +120,7 @@ void StdMeshers_MaxLength_i::SetPreestimatedLength( CORBA::Double theLength ) } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), - SALOME::BAD_PARAM ); + SALOME::BAD_PARAM ); } // this is an internal kitchen call - no Python dump // Update Python script @@ -202,3 +199,14 @@ CORBA::Boolean StdMeshers_MaxLength_i::IsDimSupported( SMESH::Dimension type ) { return type == SMESH::DIM_1D; } + +//================================================================================ +/*! + * \brief Return method name corresponding to index of variable parameter + */ +//================================================================================ + +std::string StdMeshers_MaxLength_i::getMethodOfParameter(const int, int) const +{ + return "SetLength"; +}