1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #include <Standard_Stream.hxx>
23 #include <GEOMImpl_Template.hxx>
24 #include <GEOM_Function.hxx>
25 #include <TopoDS_Shape.hxx>
27 //=======================================================================
30 //=======================================================================
31 const Standard_GUID& GEOMImpl_Template::GetID()
33 static Standard_GUID aTemplate("Insert the correct GUID here");
38 //=======================================================================
39 //function : GEOMImpl_Template
41 //=======================================================================
43 GEOMImpl_Template::GEOMImpl_Template()
47 //=======================================================================
50 //=======================================================================
51 Standard_Integer GEOMImpl_Template::Execute(TFunction_Logbook& log) const
53 if (Label().IsNull()) return 0;
54 Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
55 if(aFunction.IsNull()) return 0;
57 //Add implemetation here
59 log.SetTouched(Label());
64 //=======================================================================
65 //function : GEOMImpl_Template_Type_
67 //=======================================================================
68 Standard_EXPORT Handle_Standard_Type& GEOMImpl_Template_Type_()
71 static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
72 if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
73 static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
74 if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
75 static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
76 if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
79 static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
80 static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Template",
81 sizeof(GEOMImpl_Template),
83 (Standard_Address)_Ancestors,
84 (Standard_Address)NULL);
89 //=======================================================================
92 //=======================================================================
94 const Handle(GEOMImpl_Template) Handle(GEOMImpl_Template)::DownCast(const Handle(Standard_Transient)& AnObject)
96 Handle(GEOMImpl_Template) _anOtherObject;
98 if (!AnObject.IsNull()) {
99 if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_Template))) {
100 _anOtherObject = Handle(GEOMImpl_Template)((Handle(GEOMImpl_Template)&)AnObject);
104 return _anOtherObject ;