]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMImpl/GEOMImpl_Template.cxx
Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / GEOMImpl / GEOMImpl_Template.cxx
1
2 using namespace std;
3 #include "GEOMImpl_Template.hxx"
4 #include "GEOM_Function.hxx"
5 #include <TopoDS_Shape.hxx>
6
7 //=======================================================================
8 //function : GetID
9 //purpose  :
10 //======================================================================= 
11 const Standard_GUID& GEOMImpl_Template::GetID()
12 {
13   static Standard_GUID aTemplate("Insert the correct GUID here");
14   return aTemplate; 
15 }
16
17
18 //=======================================================================
19 //function : GEOMImpl_Template
20 //purpose  : 
21 //=======================================================================
22
23 GEOMImpl_Template::GEOMImpl_Template() 
24 {
25 }
26
27 //=======================================================================
28 //function : Execute
29 //purpose  :
30 //======================================================================= 
31 Standard_Integer GEOMImpl_Template::Execute(TFunction_Logbook& log) const
32 {
33   if (Label().IsNull()) return 0;
34   Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); 
35   if(aFunction.IsNull()) return 0;
36   
37   //Add implemetation here
38   
39   log.SetTouched(Label());
40   return 1;    
41 }
42
43
44 //=======================================================================
45 //function :  GEOMImpl_Template_Type_
46 //purpose  :
47 //======================================================================= 
48 Standard_EXPORT Handle_Standard_Type& GEOMImpl_Template_Type_()
49 {
50
51   static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
52   if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
53   static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
54   if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); 
55   static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
56   if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
57  
58
59   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
60   static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Template",
61                                                          sizeof(GEOMImpl_Template),
62                                                          1,
63                                                          (Standard_Address)_Ancestors,
64                                                          (Standard_Address)NULL);
65
66   return _aType;
67 }
68
69 //=======================================================================
70 //function : DownCast
71 //purpose  :
72 //======================================================================= 
73
74 const Handle(GEOMImpl_Template) Handle(GEOMImpl_Template)::DownCast(const Handle(Standard_Transient)& AnObject)
75 {
76   Handle(GEOMImpl_Template) _anOtherObject;
77
78   if (!AnObject.IsNull()) {
79      if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_Template))) {
80        _anOtherObject = Handle(GEOMImpl_Template)((Handle(GEOMImpl_Template)&)AnObject);
81      }
82   }
83
84   return _anOtherObject ;
85 }
86
87