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 <IGESAppli_DrilledHole.hxx> |
7fd59977 |
16 | #include <IGESAppli_ElementResults.hxx> |
42cf5bc1 |
17 | #include <IGESAppli_FiniteElement.hxx> |
7fd59977 |
18 | #include <IGESAppli_Flow.hxx> |
42cf5bc1 |
19 | #include <IGESAppli_FlowLineSpec.hxx> |
7fd59977 |
20 | #include <IGESAppli_LevelFunction.hxx> |
42cf5bc1 |
21 | #include <IGESAppli_LevelToPWBLayerMap.hxx> |
7fd59977 |
22 | #include <IGESAppli_LineWidening.hxx> |
42cf5bc1 |
23 | #include <IGESAppli_NodalConstraint.hxx> |
24 | #include <IGESAppli_NodalDisplAndRot.hxx> |
25 | #include <IGESAppli_NodalResults.hxx> |
26 | #include <IGESAppli_Node.hxx> |
7fd59977 |
27 | #include <IGESAppli_PartNumber.hxx> |
42cf5bc1 |
28 | #include <IGESAppli_PinNumber.hxx> |
29 | #include <IGESAppli_PipingFlow.hxx> |
30 | #include <IGESAppli_Protocol.hxx> |
7fd59977 |
31 | #include <IGESAppli_PWBArtworkStackup.hxx> |
32 | #include <IGESAppli_PWBDrilledHole.hxx> |
42cf5bc1 |
33 | #include <IGESAppli_ReferenceDesignator.hxx> |
34 | #include <IGESAppli_RegionRestriction.hxx> |
7fd59977 |
35 | #include <IGESDefs.hxx> |
7fd59977 |
36 | #include <IGESDefs_Protocol.hxx> |
42cf5bc1 |
37 | #include <IGESDraw.hxx> |
7fd59977 |
38 | #include <IGESDraw_Protocol.hxx> |
42cf5bc1 |
39 | #include <Interface_Protocol.hxx> |
40 | #include <Standard_Type.hxx> |
7fd59977 |
41 | |
92efcf78 |
42 | IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Protocol,IGESData_Protocol) |
43 | |
c48e2889 |
44 | static int THE_IGESAppli_Protocol_deja = 0; |
45 | |
7fd59977 |
46 | static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, |
47 | atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15, |
48 | atype16,atype17,atype18,atype19; |
49 | |
c48e2889 |
50 | IGESAppli_Protocol::IGESAppli_Protocol() |
7fd59977 |
51 | { |
c48e2889 |
52 | if (THE_IGESAppli_Protocol_deja) |
53 | { |
54 | return; |
55 | } |
56 | |
57 | THE_IGESAppli_Protocol_deja = 1; |
7fd59977 |
58 | atype01 = STANDARD_TYPE(IGESAppli_DrilledHole); |
59 | atype02 = STANDARD_TYPE(IGESAppli_ElementResults); |
60 | atype03 = STANDARD_TYPE(IGESAppli_FiniteElement); |
61 | atype04 = STANDARD_TYPE(IGESAppli_Flow); |
62 | atype05 = STANDARD_TYPE(IGESAppli_FlowLineSpec); |
63 | atype06 = STANDARD_TYPE(IGESAppli_LevelFunction); |
64 | atype07 = STANDARD_TYPE(IGESAppli_LevelToPWBLayerMap); |
65 | atype08 = STANDARD_TYPE(IGESAppli_LineWidening); |
66 | atype09 = STANDARD_TYPE(IGESAppli_NodalConstraint); |
67 | atype10 = STANDARD_TYPE(IGESAppli_NodalDisplAndRot); |
68 | atype11 = STANDARD_TYPE(IGESAppli_NodalResults); |
69 | atype12 = STANDARD_TYPE(IGESAppli_Node); |
70 | atype13 = STANDARD_TYPE(IGESAppli_PWBArtworkStackup); |
71 | atype14 = STANDARD_TYPE(IGESAppli_PWBDrilledHole); |
72 | atype15 = STANDARD_TYPE(IGESAppli_PartNumber); |
73 | atype16 = STANDARD_TYPE(IGESAppli_PinNumber); |
74 | atype17 = STANDARD_TYPE(IGESAppli_PipingFlow); |
75 | atype18 = STANDARD_TYPE(IGESAppli_ReferenceDesignator); |
76 | atype19 = STANDARD_TYPE(IGESAppli_RegionRestriction); |
77 | } |
78 | |
79 | Standard_Integer IGESAppli_Protocol::NbResources () const |
80 | { return 2; } |
81 | |
82 | Handle(Interface_Protocol) IGESAppli_Protocol::Resource |
83 | (const Standard_Integer num) const |
84 | { |
85 | Handle(Interface_Protocol) res; |
86 | if (num == 1) res = IGESDefs::Protocol(); |
87 | if (num == 2) res = IGESDraw::Protocol(); |
88 | return res; |
89 | } |
90 | |
91 | Standard_Integer IGESAppli_Protocol::TypeNumber |
92 | (const Handle(Standard_Type)& atype) const |
93 | { |
94 | if (atype == atype01) return 1; |
95 | else if (atype == atype02) return 2; |
96 | else if (atype == atype03) return 3; |
97 | else if (atype == atype04) return 4; |
98 | else if (atype == atype05) return 5; |
99 | else if (atype == atype06) return 6; |
100 | else if (atype == atype07) return 7; |
101 | else if (atype == atype08) return 8; |
102 | else if (atype == atype09) return 9; |
103 | else if (atype == atype10) return 10; |
104 | else if (atype == atype11) return 11; |
105 | else if (atype == atype12) return 12; |
106 | else if (atype == atype13) return 13; |
107 | else if (atype == atype14) return 14; |
108 | else if (atype == atype15) return 15; |
109 | else if (atype == atype16) return 16; |
110 | else if (atype == atype17) return 17; |
111 | else if (atype == atype18) return 18; |
112 | else if (atype == atype19) return 19; |
113 | return 0; |
114 | } |