]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOM/GEOM_Function.cxx
Salome HOME
0021672: [CEA 565] Dump Study from script
[modules/geom.git] / src / GEOM / GEOM_Function.cxx
index 0ed23645e6b9d0926b68298cb7a1d07f80e5e2b2..146863614f6c54b3964e090546166e45dc74efb7 100644 (file)
@@ -137,6 +137,23 @@ GEOM_Function::GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& the
   aRoot->Append(aNode);
 }
 
+//================================================================================
+/*!
+ * \brief Retuns true if this function is the last one in the study
+ */
+//================================================================================
+
+bool GEOM_Function::IsLastFuntion()
+{
+  bool isLast = false;
+
+  Handle(TDataStd_TreeNode) aNode;
+  if (_label.FindAttribute(GetFunctionTreeID(), aNode))
+    isLast = !aNode->HasNext();
+
+  return isLast;
+}
+
 //=============================================================================
 /*!
  *  GetOwner