X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM%2FGEOM_Function.cxx;h=53731e11f768661e8a49d12c84d7d4820406b7b3;hb=14e1a694c4cf249fe205a39c099482bc5b28a6e5;hp=17b45b06457c5393a651130dff16fdad539ee7b5;hpb=9680031be017f475ebb1d506a72b9527f5ce70b3;p=modules%2Fgeom.git diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index 17b45b064..53731e11f 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 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 @@ -27,8 +27,6 @@ #include #include -#include - #include "utilities.h" #include @@ -56,10 +54,6 @@ #include #include -#include -#include -#include -#include #include #include @@ -159,7 +153,7 @@ GEOM_Function::~GEOM_Function() //================================================================================ /*! - * \brief Retuns true if this function is the last one in the study + * \brief Returns true if this function is the last one in the study */ //================================================================================ @@ -254,9 +248,8 @@ TopoDS_Shape GEOM_Function::GetValue() return aShape; } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString()); + catch (Standard_Failure& aFail) { + MESSAGE("GEOM_Function::GetValue Error: " << aFail.GetMessageString()); return aShape; } } @@ -826,12 +819,7 @@ void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape) TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); - Handle(TDataStd_ExtStringList) aList; - if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) { - aList = new TDataStd_ExtStringList; - aSubShapesLabel.AddAttribute(aList); - } - + Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel ); TCollection_AsciiString anEntry; TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry); aList->Append(anEntry); @@ -884,11 +872,7 @@ const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences() TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); - Handle(TDataStd_ExtStringList) aList; - if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) { - aList = new TDataStd_ExtStringList; - aSubShapesLabel.AddAttribute(aList); - } + Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel ); _isDone = true; return aList->List(); @@ -993,5 +977,4 @@ void* GEOM_Function::GetCallBackData() return reinterpret_cast ( address ); } -IMPLEMENT_STANDARD_HANDLE (GEOM_Function, Standard_Transient); -IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient ); +IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient )