X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM%2FGEOM_Object.cxx;h=41d89278643c5890595bdf7c9ae466031d21380f;hb=14e1a694c4cf249fe205a39c099482bc5b28a6e5;hp=2aac31bf5754fc0a847784939cd3e665cb69768f;hpb=b51357b79dff28f1970125b19b018d392dfb0e75;p=modules%2Fgeom.git diff --git a/src/GEOM/GEOM_Object.cxx b/src/GEOM/GEOM_Object.cxx index 2aac31bf5..41d892786 100644 --- a/src/GEOM/GEOM_Object.cxx +++ b/src/GEOM/GEOM_Object.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 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 @@ -6,7 +6,7 @@ // 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. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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 ) +