X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSALOMEDS%2FSALOMEDS_AttributePythonObject_i.cxx;h=94ab37c59b9abb7d2045109254418c54d1497acf;hb=83f6420d3682a53ec22b946b95c037e83a05ca59;hp=83fec99bdcc1fa7e7eb2d4daed1db3486b710362;hpb=61d4fc88c862e718985aa6e9b1bf72f055553eee;p=modules%2Fkernel.git diff --git a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx index 83fec99bd..94ab37c59 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx @@ -1,29 +1,52 @@ -using namespace std; -// File: SALOMEDS_AttributePythonObject_i.cxx -// Created: Tue Oct 8 10:13:30 2002 -// Author: Michael Ponikarov -// Project : SALOME -// Module : SALOMEDS -// Copyright : Open CASCADE -// $Header$ +// Copyright (C) 2007-2013 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 +// +// 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 +// +// File : SALOMEDS_AttributePythonObject_i.cxx +// Author : Sergey RUIN +// Module : SALOME +// #include "SALOMEDS_AttributePythonObject_i.hxx" -#include -#include -#include "SALOMEDS_SObject_i.hxx" +#include "SALOMEDS.hxx" -void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA::Boolean IsScript) { +void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA::Boolean IsScript) +{ + SALOMEDS::Locker lock; CheckLocked(); char *aSeq = CORBA::string_dup(theSequence); - Handle(SALOMEDS_PythonObjectAttribute)::DownCast(_myAttr)->SetObject(aSeq, IsScript); + dynamic_cast(_impl)->SetObject(aSeq, IsScript); } -char* SALOMEDS_AttributePythonObject_i::GetObject() { - char* aSeq = Handle(SALOMEDS_PythonObjectAttribute)::DownCast(_myAttr)->GetObject(); - CORBA::String_var aStr = CORBA::string_dup(aSeq); +char* SALOMEDS_AttributePythonObject_i::GetObject() +{ + SALOMEDS::Locker lock; + 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() { - return Handle(SALOMEDS_PythonObjectAttribute)::DownCast(_myAttr)->IsScript(); +CORBA::Boolean SALOMEDS_AttributePythonObject_i::IsScript() +{ + SALOMEDS::Locker lock; + return dynamic_cast(_impl)->IsScript(); } + +