Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IGESGeom / IGESGeom_Protocol.cxx
CommitLineData
7fd59977 1#include <IGESGeom_Protocol.ixx>
2
3#include <IGESGeom_BSplineCurve.hxx>
4#include <IGESGeom_BSplineSurface.hxx>
5#include <IGESGeom_Boundary.hxx>
6#include <IGESGeom_BoundedSurface.hxx>
7#include <IGESGeom_CircularArc.hxx>
8#include <IGESGeom_CompositeCurve.hxx>
9#include <IGESGeom_ConicArc.hxx>
10#include <IGESGeom_CopiousData.hxx>
11#include <IGESGeom_CurveOnSurface.hxx>
12#include <IGESGeom_Direction.hxx>
13#include <IGESGeom_Flash.hxx>
14#include <IGESGeom_Line.hxx>
15#include <IGESGeom_OffsetCurve.hxx>
16#include <IGESGeom_OffsetSurface.hxx>
17#include <IGESGeom_Plane.hxx>
18#include <IGESGeom_Point.hxx>
19#include <IGESGeom_RuledSurface.hxx>
20#include <IGESGeom_SplineCurve.hxx>
21#include <IGESGeom_SplineSurface.hxx>
22#include <IGESGeom_SurfaceOfRevolution.hxx>
23#include <IGESGeom_TabulatedCylinder.hxx>
24#include <IGESGeom_TransformationMatrix.hxx>
25#include <IGESGeom_TrimmedSurface.hxx>
26
27#include <IGESBasic.hxx>
28#include <IGESBasic_Protocol.hxx>
29
30static int deja = 0;
31static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
32 atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
33 atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
34
35 IGESGeom_Protocol::IGESGeom_Protocol ()
36{
37 if (deja) return; deja = 1;
38 atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve);
39 atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface);
40 atype03 = STANDARD_TYPE(IGESGeom_Boundary);
41 atype04 = STANDARD_TYPE(IGESGeom_BoundedSurface);
42 atype05 = STANDARD_TYPE(IGESGeom_CircularArc);
43 atype06 = STANDARD_TYPE(IGESGeom_CompositeCurve);
44 atype07 = STANDARD_TYPE(IGESGeom_ConicArc);
45 atype08 = STANDARD_TYPE(IGESGeom_CopiousData);
46 atype09 = STANDARD_TYPE(IGESGeom_CurveOnSurface);
47 atype10 = STANDARD_TYPE(IGESGeom_Direction);
48 atype11 = STANDARD_TYPE(IGESGeom_Flash);
49 atype12 = STANDARD_TYPE(IGESGeom_Line);
50 atype13 = STANDARD_TYPE(IGESGeom_OffsetCurve);
51 atype14 = STANDARD_TYPE(IGESGeom_OffsetSurface);
52 atype15 = STANDARD_TYPE(IGESGeom_Plane);
53 atype16 = STANDARD_TYPE(IGESGeom_Point);
54 atype17 = STANDARD_TYPE(IGESGeom_RuledSurface);
55 atype18 = STANDARD_TYPE(IGESGeom_SplineCurve);
56 atype19 = STANDARD_TYPE(IGESGeom_SplineSurface);
57 atype20 = STANDARD_TYPE(IGESGeom_SurfaceOfRevolution);
58 atype21 = STANDARD_TYPE(IGESGeom_TabulatedCylinder);
59 atype22 = STANDARD_TYPE(IGESGeom_TransformationMatrix);
60 atype23 = STANDARD_TYPE(IGESGeom_TrimmedSurface);
61}
62
63 Standard_Integer IGESGeom_Protocol::NbResources () const
64 { return 1; }
65
66 Handle(Interface_Protocol) IGESGeom_Protocol::Resource
67 (const Standard_Integer num) const
68{
69 Handle(Interface_Protocol) res = IGESBasic::Protocol();;
70 return res;
71}
72
73 Standard_Integer IGESGeom_Protocol::TypeNumber
74 (const Handle(Standard_Type)& atype) const
75{
76 if (atype == atype01) return 1;
77 else if (atype == atype02) return 2;
78 else if (atype == atype03) return 3;
79 else if (atype == atype04) return 4;
80 else if (atype == atype05) return 5;
81 else if (atype == atype06) return 6;
82 else if (atype == atype07) return 7;
83 else if (atype == atype08) return 8;
84 else if (atype == atype09) return 9;
85 else if (atype == atype10) return 10;
86 else if (atype == atype11) return 11;
87 else if (atype == atype12) return 12;
88 else if (atype == atype13) return 13;
89 else if (atype == atype14) return 14;
90 else if (atype == atype15) return 15;
91 else if (atype == atype16) return 16;
92 else if (atype == atype17) return 17;
93 else if (atype == atype18 ) return 18;
94 else if (atype == atype19) return 19;
95 else if (atype == atype20) return 20;
96 else if (atype == atype21) return 21;
97 else if (atype == atype22) return 22;
98 else if (atype == atype23) return 23;
99 return 0;
100}