From d946d05748a1ac7b7c3ca784a66214dc7161e805 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 17 Jun 2013 12:19:23 +0000 Subject: [PATCH] 0021684: EDF 2221 : Display the arguments and the name of the operations + //Returns a driver creator of this object + Standard_EXPORT Handle(TFunction_Driver) GetCreationDriver(); --- src/GEOM/GEOM_Object.cxx | 61 +++++++++++++++++++++++++++------------- src/GEOM/GEOM_Object.hxx | 4 +++ 2 files changed, 46 insertions(+), 19 deletions(-) diff --git a/src/GEOM/GEOM_Object.cxx b/src/GEOM/GEOM_Object.cxx index 2cecf7bb4..1d42b7602 100644 --- a/src/GEOM/GEOM_Object.cxx +++ b/src/GEOM/GEOM_Object.cxx @@ -20,32 +20,35 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include - -#include "utilities.h" +#include "GEOM_Object.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Solver.hxx" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include #include -#include -#include -#include -#include +#include +#include +#include #include -#include -#include #include +#include +#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include +#include + +#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 diff --git a/src/GEOM/GEOM_Object.hxx b/src/GEOM/GEOM_Object.hxx index 4f2effb3c..cc1160d2f 100644 --- a/src/GEOM/GEOM_Object.hxx +++ b/src/GEOM/GEOM_Object.hxx @@ -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 //########################################################### -- 2.39.2