-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SALOMEDS_StudyBuilder_i.cxx
// Author : Seregy RUIN
// Module : SALOME
#include <DF_Document.hxx>
#include <stdlib.h>
-using namespace std;
-
UNEXPECT_CATCH(SBSalomeException, SALOME::SALOME_Exception);
UNEXPECT_CATCH(SBLockProtection, SALOMEDS::StudyBuilder::LockProtection);
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();
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();
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;
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));
}
//============================================================================
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();
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));
}
//============================================================================
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));
}
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));
}
//============================================================================
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));
}
//============================================================================
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));
}