1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <IGESDefs_Protocol.ixx>
16 #include <IGESDefs_AssociativityDef.hxx>
17 #include <IGESDefs_MacroDef.hxx>
18 #include <IGESDefs_UnitsData.hxx>
19 #include <IGESDefs_AttributeDef.hxx>
20 #include <IGESDefs_TabularData.hxx>
21 #include <IGESDefs_GenericData.hxx>
22 #include <IGESDefs_AttributeTable.hxx>
24 #include <IGESGraph.hxx>
25 #include <IGESGraph_Protocol.hxx>
28 static Handle(Standard_Type) atype1,atype2,atype3,atype4,atype5,atype6,atype7;
30 IGESDefs_Protocol::IGESDefs_Protocol ()
32 if (deja) return; deja = 1;
33 atype1 = STANDARD_TYPE(IGESDefs_AssociativityDef);
34 atype2 = STANDARD_TYPE(IGESDefs_AttributeDef);
35 atype3 = STANDARD_TYPE(IGESDefs_AttributeTable);
36 atype4 = STANDARD_TYPE(IGESDefs_GenericData);
37 atype5 = STANDARD_TYPE(IGESDefs_MacroDef);
38 atype6 = STANDARD_TYPE(IGESDefs_TabularData);
39 atype7 = STANDARD_TYPE(IGESDefs_UnitsData);
42 Standard_Integer IGESDefs_Protocol::NbResources () const
45 Handle(Interface_Protocol) IGESDefs_Protocol::Resource
46 (const Standard_Integer /*num*/) const
48 Handle(Interface_Protocol) res = IGESGraph::Protocol();
52 Standard_Integer IGESDefs_Protocol::TypeNumber
53 (const Handle(Standard_Type)& atype) const
55 if (atype == atype1) return 1;
56 else if (atype == atype2) return 2;
57 else if (atype == atype3) return 3;
58 else if (atype == atype4) return 4;
59 else if (atype == atype5) return 5;
60 else if (atype == atype6) return 6;
61 else if (atype == atype7) return 7;