7fd59977 |
1 | #include <IGESDefs_Protocol.ixx> |
2 | |
3 | #include <IGESDefs_AssociativityDef.hxx> |
4 | #include <IGESDefs_MacroDef.hxx> |
5 | #include <IGESDefs_UnitsData.hxx> |
6 | #include <IGESDefs_AttributeDef.hxx> |
7 | #include <IGESDefs_TabularData.hxx> |
8 | #include <IGESDefs_GenericData.hxx> |
9 | #include <IGESDefs_AttributeTable.hxx> |
10 | |
11 | #include <IGESGraph.hxx> |
12 | #include <IGESGraph_Protocol.hxx> |
13 | |
14 | static int deja = 0; |
15 | static Handle(Standard_Type) atype1,atype2,atype3,atype4,atype5,atype6,atype7; |
16 | |
17 | IGESDefs_Protocol::IGESDefs_Protocol () |
18 | { |
19 | if (deja) return; deja = 1; |
20 | atype1 = STANDARD_TYPE(IGESDefs_AssociativityDef); |
21 | atype2 = STANDARD_TYPE(IGESDefs_AttributeDef); |
22 | atype3 = STANDARD_TYPE(IGESDefs_AttributeTable); |
23 | atype4 = STANDARD_TYPE(IGESDefs_GenericData); |
24 | atype5 = STANDARD_TYPE(IGESDefs_MacroDef); |
25 | atype6 = STANDARD_TYPE(IGESDefs_TabularData); |
26 | atype7 = STANDARD_TYPE(IGESDefs_UnitsData); |
27 | } |
28 | |
29 | Standard_Integer IGESDefs_Protocol::NbResources () const |
30 | { return 1; } |
31 | |
32 | Handle(Interface_Protocol) IGESDefs_Protocol::Resource |
33 | (const Standard_Integer num) const |
34 | { |
35 | Handle(Interface_Protocol) res = IGESGraph::Protocol(); |
36 | return res; |
37 | } |
38 | |
39 | Standard_Integer IGESDefs_Protocol::TypeNumber |
40 | (const Handle(Standard_Type)& atype) const |
41 | { |
42 | if (atype == atype1) return 1; |
43 | else if (atype == atype2) return 2; |
44 | else if (atype == atype3) return 3; |
45 | else if (atype == atype4) return 4; |
46 | else if (atype == atype5) return 5; |
47 | else if (atype == atype6) return 6; |
48 | else if (atype == atype7) return 7; |
49 | return 0; |
50 | } |