973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | |
42cf5bc1 |
15 | #include <IGESBasic.hxx> |
16 | #include <IGESBasic_Protocol.hxx> |
7fd59977 |
17 | #include <IGESGeom_Boundary.hxx> |
18 | #include <IGESGeom_BoundedSurface.hxx> |
42cf5bc1 |
19 | #include <IGESGeom_BSplineCurve.hxx> |
20 | #include <IGESGeom_BSplineSurface.hxx> |
7fd59977 |
21 | #include <IGESGeom_CircularArc.hxx> |
22 | #include <IGESGeom_CompositeCurve.hxx> |
23 | #include <IGESGeom_ConicArc.hxx> |
24 | #include <IGESGeom_CopiousData.hxx> |
25 | #include <IGESGeom_CurveOnSurface.hxx> |
26 | #include <IGESGeom_Direction.hxx> |
27 | #include <IGESGeom_Flash.hxx> |
28 | #include <IGESGeom_Line.hxx> |
29 | #include <IGESGeom_OffsetCurve.hxx> |
30 | #include <IGESGeom_OffsetSurface.hxx> |
31 | #include <IGESGeom_Plane.hxx> |
32 | #include <IGESGeom_Point.hxx> |
42cf5bc1 |
33 | #include <IGESGeom_Protocol.hxx> |
7fd59977 |
34 | #include <IGESGeom_RuledSurface.hxx> |
35 | #include <IGESGeom_SplineCurve.hxx> |
36 | #include <IGESGeom_SplineSurface.hxx> |
37 | #include <IGESGeom_SurfaceOfRevolution.hxx> |
38 | #include <IGESGeom_TabulatedCylinder.hxx> |
39 | #include <IGESGeom_TransformationMatrix.hxx> |
40 | #include <IGESGeom_TrimmedSurface.hxx> |
42cf5bc1 |
41 | #include <Interface_Protocol.hxx> |
42 | #include <Standard_Type.hxx> |
7fd59977 |
43 | |
92efcf78 |
44 | IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_Protocol,IGESData_Protocol) |
45 | |
c48e2889 |
46 | static int THE_IGESGeom_Protocol_deja = 0; |
7fd59977 |
47 | static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, |
48 | atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15, |
49 | atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23; |
50 | |
c48e2889 |
51 | IGESGeom_Protocol::IGESGeom_Protocol() |
7fd59977 |
52 | { |
c48e2889 |
53 | if (THE_IGESGeom_Protocol_deja) |
54 | { |
55 | return; |
56 | } |
57 | THE_IGESGeom_Protocol_deja = 1; |
7fd59977 |
58 | atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve); |
59 | atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface); |
60 | atype03 = STANDARD_TYPE(IGESGeom_Boundary); |
61 | atype04 = STANDARD_TYPE(IGESGeom_BoundedSurface); |
62 | atype05 = STANDARD_TYPE(IGESGeom_CircularArc); |
63 | atype06 = STANDARD_TYPE(IGESGeom_CompositeCurve); |
64 | atype07 = STANDARD_TYPE(IGESGeom_ConicArc); |
65 | atype08 = STANDARD_TYPE(IGESGeom_CopiousData); |
66 | atype09 = STANDARD_TYPE(IGESGeom_CurveOnSurface); |
67 | atype10 = STANDARD_TYPE(IGESGeom_Direction); |
68 | atype11 = STANDARD_TYPE(IGESGeom_Flash); |
69 | atype12 = STANDARD_TYPE(IGESGeom_Line); |
70 | atype13 = STANDARD_TYPE(IGESGeom_OffsetCurve); |
71 | atype14 = STANDARD_TYPE(IGESGeom_OffsetSurface); |
72 | atype15 = STANDARD_TYPE(IGESGeom_Plane); |
73 | atype16 = STANDARD_TYPE(IGESGeom_Point); |
74 | atype17 = STANDARD_TYPE(IGESGeom_RuledSurface); |
75 | atype18 = STANDARD_TYPE(IGESGeom_SplineCurve); |
76 | atype19 = STANDARD_TYPE(IGESGeom_SplineSurface); |
77 | atype20 = STANDARD_TYPE(IGESGeom_SurfaceOfRevolution); |
78 | atype21 = STANDARD_TYPE(IGESGeom_TabulatedCylinder); |
79 | atype22 = STANDARD_TYPE(IGESGeom_TransformationMatrix); |
80 | atype23 = STANDARD_TYPE(IGESGeom_TrimmedSurface); |
81 | } |
82 | |
83 | Standard_Integer IGESGeom_Protocol::NbResources () const |
84 | { return 1; } |
85 | |
86 | Handle(Interface_Protocol) IGESGeom_Protocol::Resource |
35e08fe8 |
87 | (const Standard_Integer /*num*/) const |
7fd59977 |
88 | { |
8c2d3314 |
89 | Handle(Interface_Protocol) res = IGESBasic::Protocol(); |
7fd59977 |
90 | return res; |
91 | } |
92 | |
93 | Standard_Integer IGESGeom_Protocol::TypeNumber |
94 | (const Handle(Standard_Type)& atype) const |
95 | { |
96 | if (atype == atype01) return 1; |
97 | else if (atype == atype02) return 2; |
98 | else if (atype == atype03) return 3; |
99 | else if (atype == atype04) return 4; |
100 | else if (atype == atype05) return 5; |
101 | else if (atype == atype06) return 6; |
102 | else if (atype == atype07) return 7; |
103 | else if (atype == atype08) return 8; |
104 | else if (atype == atype09) return 9; |
105 | else if (atype == atype10) return 10; |
106 | else if (atype == atype11) return 11; |
107 | else if (atype == atype12) return 12; |
108 | else if (atype == atype13) return 13; |
109 | else if (atype == atype14) return 14; |
110 | else if (atype == atype15) return 15; |
111 | else if (atype == atype16) return 16; |
112 | else if (atype == atype17) return 17; |
113 | else if (atype == atype18 ) return 18; |
114 | else if (atype == atype19) return 19; |
115 | else if (atype == atype20) return 20; |
116 | else if (atype == atype21) return 21; |
117 | else if (atype == atype22) return 22; |
118 | else if (atype == atype23) return 23; |
119 | return 0; |
120 | } |