]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0021684: EDF 2221 : Display the arguments and the name of the operations
authoreap <eap@opencascade.com>
Mon, 17 Jun 2013 12:19:23 +0000 (12:19 +0000)
committereap <eap@opencascade.com>
Mon, 17 Jun 2013 12:19:23 +0000 (12:19 +0000)
+  //Returns a driver creator of this object
+  Standard_EXPORT Handle(TFunction_Driver) GetCreationDriver();

src/GEOM/GEOM_Object.cxx
src/GEOM/GEOM_Object.hxx

index 2cecf7bb466b140d3c0ce2cf43ec4d4fb3b10c19..1d42b76025dc9c82d474f768423d1e60d166c1e6 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <Standard_Stream.hxx>
-
-#include "utilities.h"
+#include "GEOM_Object.hxx"
+#include "GEOM_Engine.hxx"
+#include "GEOM_Solver.hxx"
 
-#include <GEOM_Object.hxx>
-#include <GEOM_Engine.hxx>
-#include <GEOM_Solver.hxx>
-#include <TDF_Tool.hxx>
+#include <Standard_Stream.hxx>
+#include <TColStd_HArray1OfReal.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TCollection_ExtendedString.hxx>
 #include <TDF_Data.hxx>
-#include <TDF_Reference.hxx>
 #include <TDF_LabelSequence.hxx>
-#include <TDocStd_Owner.hxx>
-#include <TDocStd_Document.hxx>
-#include <TDataStd_Integer.hxx>
-#include <TDataStd_Real.hxx>
+#include <TDF_Reference.hxx>
+#include <TDF_Tool.hxx>
+#include <TDataStd_ByteArray.hxx>
 #include <TDataStd_ChildNodeIterator.hxx>
-#include <TDataStd_UAttribute.hxx>
-#include <TDataStd_Name.hxx>
 #include <TDataStd_Comment.hxx>
+#include <TDataStd_Integer.hxx>
+#include <TDataStd_Name.hxx>
+#include <TDataStd_Real.hxx>
 #include <TDataStd_RealArray.hxx>
-#include <TDataStd_ByteArray.hxx>
-#include <TColStd_HArray1OfReal.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
+#include <TDataStd_UAttribute.hxx>
+#include <TDocStd_Document.hxx>
+#include <TDocStd_Owner.hxx>
+#include <TFunction_Driver.hxx>
+#include <TFunction_DriverTable.hxx>
 #include <TopExp.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+
+#include "utilities.h"
+
 
 #define FUNCTION_LABEL(theNb) (_label.FindChild(1).FindChild((theNb)))
 #define TYPE_LABEL       2
@@ -649,6 +652,26 @@ Handle(TColStd_HSequenceOfTransient) GEOM_Object::GetLastDependency()
   return anArray;
 }
 
+//================================================================================
+/*!
+ * \brief Returns a driver creator of this object
+ */
+//================================================================================
+
+Handle(TFunction_Driver) GEOM_Object::GetCreationDriver()
+{
+  Handle(TFunction_Driver) aDriver;
+
+  Handle(GEOM_Function) function = GetFunction(1);
+  if ( !function.IsNull() )
+  {
+    Standard_GUID aGUID = function->GetDriverGUID();
+    if ( TFunction_DriverTable::Get()->FindDriver(aGUID, aDriver))
+      aDriver->Init( function->GetEntry() );
+  }
+  return aDriver;
+}
+
 //=============================================================================
 /*!
  *  GetFreeLabel
index 4f2effb3cae5b98be3a00a3d2790edd49e89ab6e..cc1160d2f3a0a32124bd1cc34d3ba58b05124b49 100644 (file)
@@ -66,6 +66,7 @@ class Standard_Transient;
 class Handle_Standard_Type;
 class Handle(MMgt_TShared);
 class GEOM_Object;
+class Handle(TFunction_Driver);
 
 
 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Object);
@@ -298,6 +299,9 @@ class GEOM_Object : public MMgt_TShared
   //Returns the dependencies of the last function
   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetLastDependency();
 
+  //Returns a driver creator of this object
+  Standard_EXPORT Handle(TFunction_Driver) GetCreationDriver();
+
   //###########################################################
   // Internal methods
   //###########################################################