X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMEDS%2FSALOMEDS_StudyBuilder_i.cxx;h=492a911dd43385eb76aaf23b481606c8624f3952;hb=f01a3911fa7b074af7e1ac958be5763aeed5d056;hp=3609befb98e1036ee38a138117d4b248dec43fa1;hpb=a3944cdd436acc9de79b63c9a36e4ea193808037;p=modules%2Fkernel.git diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx index 3609befb9..492a911dd 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx @@ -1,24 +1,25 @@ -// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDS_StudyBuilder_i.cxx // Author : Seregy RUIN // Module : SALOME @@ -43,8 +44,6 @@ #include #include -using namespace std; - UNEXPECT_CATCH(SBSalomeException, SALOME::SALOME_Exception); UNEXPECT_CATCH(SBLockProtection, SALOMEDS::StudyBuilder::LockProtection); @@ -78,7 +77,7 @@ SALOMEDS::SComponent_ptr SALOMEDS_StudyBuilder_i::NewComponent(const char* DataT SALOMEDS::Locker lock; CheckLocked(); //char* aDataType = CORBA::string_dup(DataType); - SALOMEDSImpl_SComponent aSCO = _impl->NewComponent(string(DataType)); + SALOMEDSImpl_SComponent aSCO = _impl->NewComponent(std::string(DataType)); //CORBA::free_string(aDataType); if(aSCO.IsNull()) return SALOMEDS::SComponent::_nil(); @@ -231,7 +230,7 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_StudyBuilder_i::FindOrCreateAttribute(SA SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.inout()); DF_Attribute* anAttr; try { - anAttr = _impl->FindOrCreateAttribute(aSO, string(aTypeOfAttribute)); + anAttr = _impl->FindOrCreateAttribute(aSO, std::string(aTypeOfAttribute)); } catch (...) { throw SALOMEDS::StudyBuilder::LockProtection(); @@ -261,7 +260,7 @@ CORBA::Boolean SALOMEDS_StudyBuilder_i::FindAttribute(SALOMEDS::SObject_ptr anOb SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); DF_Attribute* anAttr; - if(!_impl->FindAttribute(aSO, anAttr, string(aTypeOfAttribute))) return false; + if(!_impl->FindAttribute(aSO, anAttr, std::string(aTypeOfAttribute))) return false; anAttribute = SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb); return true; @@ -281,7 +280,7 @@ void SALOMEDS_StudyBuilder_i::RemoveAttribute(SALOMEDS::SObject_ptr anObject, ASSERT(!CORBA::is_nil(anObject)); CORBA::String_var anID = anObject->GetID(); SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); - _impl->RemoveAttribute(aSO, string(aTypeOfAttribute)); + _impl->RemoveAttribute(aSO, std::string(aTypeOfAttribute)); } //============================================================================ @@ -331,8 +330,8 @@ void SALOMEDS_StudyBuilder_i::AddDirectory(const char* thePath) SALOMEDS::Locker lock; CheckLocked(); if(thePath == NULL || strlen(thePath) == 0) throw SALOMEDS::Study::StudyInvalidDirectory(); - if(!_impl->AddDirectory(string(thePath))) { - string anErrorCode = _impl->GetErrorCode(); + if(!_impl->AddDirectory(std::string(thePath))) { + std::string anErrorCode = _impl->GetErrorCode(); if(anErrorCode == "StudyNameAlreadyUsed") throw SALOMEDS::Study::StudyNameAlreadyUsed(); if(anErrorCode == "StudyInvalidDirectory") throw SALOMEDS::Study::StudyInvalidDirectory(); if(anErrorCode == "StudyInvalidComponent") throw SALOMEDS::Study::StudyInvalidComponent(); @@ -352,7 +351,7 @@ void SALOMEDS_StudyBuilder_i::SetGUID(SALOMEDS::SObject_ptr anObject, const char ASSERT(!CORBA::is_nil(anObject)); CORBA::String_var anID=anObject->GetID(); SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); - _impl->SetGUID(aSO, string(theGUID)); + _impl->SetGUID(aSO, std::string(theGUID)); } //============================================================================ @@ -366,7 +365,7 @@ bool SALOMEDS_StudyBuilder_i::IsGUID(SALOMEDS::SObject_ptr anObject, const char* ASSERT(!CORBA::is_nil(anObject)); CORBA::String_var anID=anObject->GetID(); SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); - return _impl->IsGUID(aSO, string(theGUID)); + return _impl->IsGUID(aSO, std::string(theGUID)); } @@ -533,7 +532,7 @@ void SALOMEDS_StudyBuilder_i::SetName(SALOMEDS::SObject_ptr theSO, const char* t CORBA::String_var anID=theSO->GetID(); SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); - _impl->SetName(aSO, string(theValue)); + _impl->SetName(aSO, std::string(theValue)); } //============================================================================ @@ -550,7 +549,7 @@ void SALOMEDS_StudyBuilder_i::SetComment(SALOMEDS::SObject_ptr theSO, const char CORBA::String_var anID=theSO->GetID(); SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); - _impl->SetComment(aSO, string(theValue)); + _impl->SetComment(aSO, std::string(theValue)); } //============================================================================ @@ -567,5 +566,5 @@ void SALOMEDS_StudyBuilder_i::SetIOR(SALOMEDS::SObject_ptr theSO, const char* th CORBA::String_var anID=theSO->GetID(); SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.in()); - _impl->SetIOR(aSO, string(theValue)); + _impl->SetIOR(aSO, std::string(theValue)); }