1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #include <Standard_Stream.hxx>
24 #include <GEOMImpl_Template.hxx>
25 #include <GEOM_Function.hxx>
26 #include <TopoDS_Shape.hxx>
28 //=======================================================================
31 //=======================================================================
32 const Standard_GUID& GEOMImpl_Template::GetID()
34 static Standard_GUID aTemplate("Insert the correct GUID here");
39 //=======================================================================
40 //function : GEOMImpl_Template
42 //=======================================================================
44 GEOMImpl_Template::GEOMImpl_Template()
48 //=======================================================================
51 //=======================================================================
52 Standard_Integer GEOMImpl_Template::Execute(TFunction_Logbook& log) const
54 if (Label().IsNull()) return 0;
55 Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
56 if(aFunction.IsNull()) return 0;
58 //Add implemetation here
60 log.SetTouched(Label());
65 //=======================================================================
66 //function : GEOMImpl_Template_Type_
68 //=======================================================================
69 Standard_EXPORT Handle_Standard_Type& GEOMImpl_Template_Type_()
72 static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
73 if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
74 static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
75 if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
76 static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
77 if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
80 static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
81 static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Template",
82 sizeof(GEOMImpl_Template),
84 (Standard_Address)_Ancestors,
85 (Standard_Address)NULL);
90 //=======================================================================
93 //=======================================================================
95 const Handle(GEOMImpl_Template) Handle(GEOMImpl_Template)::DownCast(const Handle(Standard_Transient)& AnObject)
97 Handle(GEOMImpl_Template) _anOtherObject;
99 if (!AnObject.IsNull()) {
100 if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_Template))) {
101 _anOtherObject = Handle(GEOMImpl_Template)((Handle(GEOMImpl_Template)&)AnObject);
105 return _anOtherObject ;