1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
18 #include <IGESAppli_Protocol.ixx>
20 #include <IGESAppli_Node.hxx>
21 #include <IGESAppli_FiniteElement.hxx>
22 #include <IGESAppli_NodalDisplAndRot.hxx>
23 #include <IGESAppli_NodalResults.hxx>
24 #include <IGESAppli_ElementResults.hxx>
25 #include <IGESAppli_Flow.hxx>
26 #include <IGESAppli_PipingFlow.hxx>
27 #include <IGESAppli_RegionRestriction.hxx>
28 #include <IGESAppli_LevelFunction.hxx>
29 #include <IGESAppli_LineWidening.hxx>
30 #include <IGESAppli_DrilledHole.hxx>
31 #include <IGESAppli_ReferenceDesignator.hxx>
32 #include <IGESAppli_PinNumber.hxx>
33 #include <IGESAppli_PartNumber.hxx>
34 #include <IGESAppli_FlowLineSpec.hxx>
35 #include <IGESAppli_LevelToPWBLayerMap.hxx>
36 #include <IGESAppli_PWBArtworkStackup.hxx>
37 #include <IGESAppli_PWBDrilledHole.hxx>
38 #include <IGESAppli_NodalConstraint.hxx>
40 #include <IGESDefs.hxx>
41 #include <IGESDraw.hxx>
42 #include <IGESDefs_Protocol.hxx>
43 #include <IGESDraw_Protocol.hxx>
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;
51 IGESAppli_Protocol::IGESAppli_Protocol ()
53 if (deja) return; deja = 1;
54 atype01 = STANDARD_TYPE(IGESAppli_DrilledHole);
55 atype02 = STANDARD_TYPE(IGESAppli_ElementResults);
56 atype03 = STANDARD_TYPE(IGESAppli_FiniteElement);
57 atype04 = STANDARD_TYPE(IGESAppli_Flow);
58 atype05 = STANDARD_TYPE(IGESAppli_FlowLineSpec);
59 atype06 = STANDARD_TYPE(IGESAppli_LevelFunction);
60 atype07 = STANDARD_TYPE(IGESAppli_LevelToPWBLayerMap);
61 atype08 = STANDARD_TYPE(IGESAppli_LineWidening);
62 atype09 = STANDARD_TYPE(IGESAppli_NodalConstraint);
63 atype10 = STANDARD_TYPE(IGESAppli_NodalDisplAndRot);
64 atype11 = STANDARD_TYPE(IGESAppli_NodalResults);
65 atype12 = STANDARD_TYPE(IGESAppli_Node);
66 atype13 = STANDARD_TYPE(IGESAppli_PWBArtworkStackup);
67 atype14 = STANDARD_TYPE(IGESAppli_PWBDrilledHole);
68 atype15 = STANDARD_TYPE(IGESAppli_PartNumber);
69 atype16 = STANDARD_TYPE(IGESAppli_PinNumber);
70 atype17 = STANDARD_TYPE(IGESAppli_PipingFlow);
71 atype18 = STANDARD_TYPE(IGESAppli_ReferenceDesignator);
72 atype19 = STANDARD_TYPE(IGESAppli_RegionRestriction);
75 Standard_Integer IGESAppli_Protocol::NbResources () const
78 Handle(Interface_Protocol) IGESAppli_Protocol::Resource
79 (const Standard_Integer num) const
81 Handle(Interface_Protocol) res;
82 if (num == 1) res = IGESDefs::Protocol();
83 if (num == 2) res = IGESDraw::Protocol();
87 Standard_Integer IGESAppli_Protocol::TypeNumber
88 (const Handle(Standard_Type)& atype) const
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;