-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 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
// 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
*/
//=============================================================================
-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 );
*/
//=============================================================================
-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 );
//=============================================================================
GEOM_Object::~GEOM_Object()
{
- MESSAGE("GEOM_Object::~GEOM_Object()");
+ //MESSAGE("GEOM_Object::~GEOM_Object()");
}
//=============================================================================
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<Handle(GEOM_Object)>::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 )
+