0027232: Configuration - fix mblen missing building issue on Android
[occt.git] / src / IGESGeom / IGESGeom_Protocol.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <IGESBasic.hxx>
16 #include <IGESBasic_Protocol.hxx>
17 #include <IGESGeom_Boundary.hxx>
18 #include <IGESGeom_BoundedSurface.hxx>
19 #include <IGESGeom_BSplineCurve.hxx>
20 #include <IGESGeom_BSplineSurface.hxx>
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>
33 #include <IGESGeom_Protocol.hxx>
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>
41 #include <Interface_Protocol.hxx>
42 #include <Standard_Type.hxx>
43
44 IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_Protocol,IGESData_Protocol)
45
46 static int deja = 0;
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
51     IGESGeom_Protocol::IGESGeom_Protocol ()
52 {
53   if (deja) return;  deja = 1;
54   atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve);
55   atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface);
56   atype03 = STANDARD_TYPE(IGESGeom_Boundary);
57   atype04 = STANDARD_TYPE(IGESGeom_BoundedSurface);
58   atype05 = STANDARD_TYPE(IGESGeom_CircularArc);
59   atype06 = STANDARD_TYPE(IGESGeom_CompositeCurve);
60   atype07 = STANDARD_TYPE(IGESGeom_ConicArc);
61   atype08 = STANDARD_TYPE(IGESGeom_CopiousData);
62   atype09 = STANDARD_TYPE(IGESGeom_CurveOnSurface);
63   atype10 = STANDARD_TYPE(IGESGeom_Direction);
64   atype11 = STANDARD_TYPE(IGESGeom_Flash);
65   atype12 = STANDARD_TYPE(IGESGeom_Line);
66   atype13 = STANDARD_TYPE(IGESGeom_OffsetCurve);
67   atype14 = STANDARD_TYPE(IGESGeom_OffsetSurface);
68   atype15 = STANDARD_TYPE(IGESGeom_Plane);
69   atype16 = STANDARD_TYPE(IGESGeom_Point);
70   atype17 = STANDARD_TYPE(IGESGeom_RuledSurface);
71   atype18 = STANDARD_TYPE(IGESGeom_SplineCurve);
72   atype19 = STANDARD_TYPE(IGESGeom_SplineSurface);
73   atype20 = STANDARD_TYPE(IGESGeom_SurfaceOfRevolution);
74   atype21 = STANDARD_TYPE(IGESGeom_TabulatedCylinder);
75   atype22 = STANDARD_TYPE(IGESGeom_TransformationMatrix);
76   atype23 = STANDARD_TYPE(IGESGeom_TrimmedSurface);
77 }
78
79     Standard_Integer IGESGeom_Protocol::NbResources () const
80       {  return 1;  }
81
82     Handle(Interface_Protocol) IGESGeom_Protocol::Resource
83   (const Standard_Integer /*num*/) const
84 {
85   Handle(Interface_Protocol) res = IGESBasic::Protocol();;
86   return res;
87 }
88
89     Standard_Integer IGESGeom_Protocol::TypeNumber
90   (const Handle(Standard_Type)& atype) const
91 {
92   if      (atype == atype01) return  1;
93   else if (atype == atype02) return  2;
94   else if (atype == atype03) return  3;
95   else if (atype == atype04) return  4;
96   else if (atype == atype05) return  5;
97   else if (atype == atype06) return  6;
98   else if (atype == atype07) return  7;
99   else if (atype == atype08) return  8;
100   else if (atype == atype09) return  9;
101   else if (atype == atype10) return 10;
102   else if (atype == atype11) return 11;
103   else if (atype == atype12) return 12;
104   else if (atype == atype13) return 13;
105   else if (atype == atype14) return 14;
106   else if (atype == atype15) return 15;
107   else if (atype == atype16) return 16;
108   else if (atype == atype17) return 17;
109   else if (atype == atype18 ) return 18;
110   else if (atype == atype19) return 19;
111   else if (atype == atype20) return 20;
112   else if (atype == atype21) return 21;
113   else if (atype == atype22) return 22;
114   else if (atype == atype23) return 23;
115   return 0;
116 }