0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual
[occt.git] / src / IGESGeom / IGESGeom_Protocol.cxx
CommitLineData
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
44static int deja = 0;
45static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
46 atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
47 atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
48
49 IGESGeom_Protocol::IGESGeom_Protocol ()
50{
51 if (deja) return; deja = 1;
52 atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve);
53 atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface);
54 atype03 = STANDARD_TYPE(IGESGeom_Boundary);
55 atype04 = STANDARD_TYPE(IGESGeom_BoundedSurface);
56 atype05 = STANDARD_TYPE(IGESGeom_CircularArc);
57 atype06 = STANDARD_TYPE(IGESGeom_CompositeCurve);
58 atype07 = STANDARD_TYPE(IGESGeom_ConicArc);
59 atype08 = STANDARD_TYPE(IGESGeom_CopiousData);
60 atype09 = STANDARD_TYPE(IGESGeom_CurveOnSurface);
61 atype10 = STANDARD_TYPE(IGESGeom_Direction);
62 atype11 = STANDARD_TYPE(IGESGeom_Flash);
63 atype12 = STANDARD_TYPE(IGESGeom_Line);
64 atype13 = STANDARD_TYPE(IGESGeom_OffsetCurve);
65 atype14 = STANDARD_TYPE(IGESGeom_OffsetSurface);
66 atype15 = STANDARD_TYPE(IGESGeom_Plane);
67 atype16 = STANDARD_TYPE(IGESGeom_Point);
68 atype17 = STANDARD_TYPE(IGESGeom_RuledSurface);
69 atype18 = STANDARD_TYPE(IGESGeom_SplineCurve);
70 atype19 = STANDARD_TYPE(IGESGeom_SplineSurface);
71 atype20 = STANDARD_TYPE(IGESGeom_SurfaceOfRevolution);
72 atype21 = STANDARD_TYPE(IGESGeom_TabulatedCylinder);
73 atype22 = STANDARD_TYPE(IGESGeom_TransformationMatrix);
74 atype23 = STANDARD_TYPE(IGESGeom_TrimmedSurface);
75}
76
77 Standard_Integer IGESGeom_Protocol::NbResources () const
78 { return 1; }
79
80 Handle(Interface_Protocol) IGESGeom_Protocol::Resource
35e08fe8 81 (const Standard_Integer /*num*/) const
7fd59977 82{
83 Handle(Interface_Protocol) res = IGESBasic::Protocol();;
84 return res;
85}
86
87 Standard_Integer IGESGeom_Protocol::TypeNumber
88 (const Handle(Standard_Type)& atype) const
89{
90 if (atype == atype01) return 1;
91 else if (atype == atype02) return 2;
92 else if (atype == atype03) return 3;
93 else if (atype == atype04) return 4;
94 else if (atype == atype05) return 5;
95 else if (atype == atype06) return 6;
96 else if (atype == atype07) return 7;
97 else if (atype == atype08) return 8;
98 else if (atype == atype09) return 9;
99 else if (atype == atype10) return 10;
100 else if (atype == atype11) return 11;
101 else if (atype == atype12) return 12;
102 else if (atype == atype13) return 13;
103 else if (atype == atype14) return 14;
104 else if (atype == atype15) return 15;
105 else if (atype == atype16) return 16;
106 else if (atype == atype17) return 17;
107 else if (atype == atype18 ) return 18;
108 else if (atype == atype19) return 19;
109 else if (atype == atype20) return 20;
110 else if (atype == atype21) return 21;
111 else if (atype == atype22) return 22;
112 else if (atype == atype23) return 23;
113 return 0;
114}