X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM%2FGEOM_Object.cxx;h=41d89278643c5890595bdf7c9ae466031d21380f;hb=14e1a694c4cf249fe205a39c099482bc5b28a6e5;hp=fc8a1f3262b8765bdec367a9a5f05a96a82e3f59;hpb=3cd92817cb4c5ee5911d6f40fe977b5e57b980e1;p=modules%2Fgeom.git diff --git a/src/GEOM/GEOM_Object.cxx b/src/GEOM/GEOM_Object.cxx old mode 100755 new mode 100644 index fc8a1f326..41d892786 --- a/src/GEOM/GEOM_Object.cxx +++ b/src/GEOM/GEOM_Object.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 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 @@ -46,7 +46,7 @@ */ //============================================================================= -Handle(GEOM_Object) GEOM_Object::GetObject(TDF_Label& theLabel) +Handle(GEOM_Object) GEOM_Object::GetObject(const TDF_Label& theLabel) { Handle(GEOM_BaseObject) base = GEOM_BaseObject::GetObject(theLabel); return Handle(GEOM_Object)::DownCast( base ); @@ -58,7 +58,7 @@ Handle(GEOM_Object) GEOM_Object::GetObject(TDF_Label& theLabel) */ //============================================================================= -Handle(GEOM_Object) GEOM_Object::GetReferencedObject(TDF_Label& theLabel) +Handle(GEOM_Object) GEOM_Object::GetReferencedObject(const TDF_Label& theLabel) { Handle(GEOM_BaseObject) base = GEOM_BaseObject::GetReferencedObject(theLabel); return Handle(GEOM_Object)::DownCast( base ); @@ -93,7 +93,7 @@ GEOM_Object::GEOM_Object(TDF_Label& theEntry, int theType) //============================================================================= GEOM_Object::~GEOM_Object() { - MESSAGE("GEOM_Object::~GEOM_Object()"); + //MESSAGE("GEOM_Object::~GEOM_Object()"); } //============================================================================= @@ -275,5 +275,26 @@ bool GEOM_Object::IsMainShape() return false; } -IMPLEMENT_STANDARD_HANDLE (GEOM_Object, GEOM_BaseObject ); -IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject ); +//================================================================================ +/*! + * \brief Returns GetLastFunction() of given objects + */ +//================================================================================ + +Handle(TColStd_HSequenceOfTransient) +GEOM_Object::GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects ) +{ + Handle(TColStd_HSequenceOfTransient) funs = new TColStd_HSequenceOfTransient; + std::list::const_iterator it = theObjects.begin(); + for (; it != theObjects.end(); it++) + { + Handle(GEOM_Function) fun = (*it)->GetLastFunction(); + if ( fun.IsNull()) + return Handle(TColStd_HSequenceOfTransient)(); + funs->Append( fun ); + } + return funs; +} + +IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject ) +