X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMEDS%2FSALOMEDS_AttributePythonObject_i.cxx;h=ea6c2ff87294c06ecacd8ece585397120dd9881a;hb=8469d4f02c5b4379665d4ec1b07709d3c8411114;hp=7021d94ead8dde3f7c5996a361173eeaa77297d0;hpb=35960e77d7f9f2a5cac7d6550c23f12943bc4378;p=modules%2Fkernel.git diff --git a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx index 7021d94ea..ea6c2ff87 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx @@ -1,54 +1,52 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE +// +// 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 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 +// 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 +// 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/ +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_AttributePythonObject_i.cxx // Author : Sergey RUIN // Module : SALOME - - +// #include "SALOMEDS_AttributePythonObject_i.hxx" #include "SALOMEDS.hxx" -#include -#include - -using namespace std; void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA::Boolean IsScript) { SALOMEDS::Locker lock; CheckLocked(); - char *aSeq = CORBA::string_dup(theSequence); - Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_impl)->SetObject(aSeq, IsScript); + CORBA::String_var aSeq = CORBA::string_dup(theSequence); + dynamic_cast(_impl)->SetObject(aSeq.in(), IsScript); } char* SALOMEDS_AttributePythonObject_i::GetObject() { SALOMEDS::Locker lock; - char* aSeq = Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_impl)->GetObject().ToCString(); - CORBA::String_var aStr = CORBA::string_dup(aSeq); + std::string aSeq(dynamic_cast(_impl)->GetObject()); + CORBA::String_var aStr = CORBA::string_dup(aSeq.c_str()); return aStr._retn(); } CORBA::Boolean SALOMEDS_AttributePythonObject_i::IsScript() { SALOMEDS::Locker lock; - return Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_impl)->IsScript(); + return dynamic_cast(_impl)->IsScript(); }