0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / IGESGeom / IGESGeom_Protocol.cxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
17
7fd59977 18#include <IGESGeom_Protocol.ixx>
19
20#include <IGESGeom_BSplineCurve.hxx>
21#include <IGESGeom_BSplineSurface.hxx>
22#include <IGESGeom_Boundary.hxx>
23#include <IGESGeom_BoundedSurface.hxx>
24#include <IGESGeom_CircularArc.hxx>
25#include <IGESGeom_CompositeCurve.hxx>
26#include <IGESGeom_ConicArc.hxx>
27#include <IGESGeom_CopiousData.hxx>
28#include <IGESGeom_CurveOnSurface.hxx>
29#include <IGESGeom_Direction.hxx>
30#include <IGESGeom_Flash.hxx>
31#include <IGESGeom_Line.hxx>
32#include <IGESGeom_OffsetCurve.hxx>
33#include <IGESGeom_OffsetSurface.hxx>
34#include <IGESGeom_Plane.hxx>
35#include <IGESGeom_Point.hxx>
36#include <IGESGeom_RuledSurface.hxx>
37#include <IGESGeom_SplineCurve.hxx>
38#include <IGESGeom_SplineSurface.hxx>
39#include <IGESGeom_SurfaceOfRevolution.hxx>
40#include <IGESGeom_TabulatedCylinder.hxx>
41#include <IGESGeom_TransformationMatrix.hxx>
42#include <IGESGeom_TrimmedSurface.hxx>
43
44#include <IGESBasic.hxx>
45#include <IGESBasic_Protocol.hxx>
46
47static int deja = 0;
48static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
49 atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
50 atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
51
52 IGESGeom_Protocol::IGESGeom_Protocol ()
53{
54 if (deja) return; deja = 1;
55 atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve);
56 atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface);
57 atype03 = STANDARD_TYPE(IGESGeom_Boundary);
58 atype04 = STANDARD_TYPE(IGESGeom_BoundedSurface);
59 atype05 = STANDARD_TYPE(IGESGeom_CircularArc);
60 atype06 = STANDARD_TYPE(IGESGeom_CompositeCurve);
61 atype07 = STANDARD_TYPE(IGESGeom_ConicArc);
62 atype08 = STANDARD_TYPE(IGESGeom_CopiousData);
63 atype09 = STANDARD_TYPE(IGESGeom_CurveOnSurface);
64 atype10 = STANDARD_TYPE(IGESGeom_Direction);
65 atype11 = STANDARD_TYPE(IGESGeom_Flash);
66 atype12 = STANDARD_TYPE(IGESGeom_Line);
67 atype13 = STANDARD_TYPE(IGESGeom_OffsetCurve);
68 atype14 = STANDARD_TYPE(IGESGeom_OffsetSurface);
69 atype15 = STANDARD_TYPE(IGESGeom_Plane);
70 atype16 = STANDARD_TYPE(IGESGeom_Point);
71 atype17 = STANDARD_TYPE(IGESGeom_RuledSurface);
72 atype18 = STANDARD_TYPE(IGESGeom_SplineCurve);
73 atype19 = STANDARD_TYPE(IGESGeom_SplineSurface);
74 atype20 = STANDARD_TYPE(IGESGeom_SurfaceOfRevolution);
75 atype21 = STANDARD_TYPE(IGESGeom_TabulatedCylinder);
76 atype22 = STANDARD_TYPE(IGESGeom_TransformationMatrix);
77 atype23 = STANDARD_TYPE(IGESGeom_TrimmedSurface);
78}
79
80 Standard_Integer IGESGeom_Protocol::NbResources () const
81 { return 1; }
82
83 Handle(Interface_Protocol) IGESGeom_Protocol::Resource
35e08fe8 84 (const Standard_Integer /*num*/) const
7fd59977 85{
86 Handle(Interface_Protocol) res = IGESBasic::Protocol();;
87 return res;
88}
89
90 Standard_Integer IGESGeom_Protocol::TypeNumber
91 (const Handle(Standard_Type)& atype) const
92{
93 if (atype == atype01) return 1;
94 else if (atype == atype02) return 2;
95 else if (atype == atype03) return 3;
96 else if (atype == atype04) return 4;
97 else if (atype == atype05) return 5;
98 else if (atype == atype06) return 6;
99 else if (atype == atype07) return 7;
100 else if (atype == atype08) return 8;
101 else if (atype == atype09) return 9;
102 else if (atype == atype10) return 10;
103 else if (atype == atype11) return 11;
104 else if (atype == atype12) return 12;
105 else if (atype == atype13) return 13;
106 else if (atype == atype14) return 14;
107 else if (atype == atype15) return 15;
108 else if (atype == atype16) return 16;
109 else if (atype == atype17) return 17;
110 else if (atype == atype18 ) return 18;
111 else if (atype == atype19) return 19;
112 else if (atype == atype20) return 20;
113 else if (atype == atype21) return 21;
114 else if (atype == atype22) return 22;
115 else if (atype == atype23) return 23;
116 return 0;
117}