7fd59977 |
1 | #include <IGESBasic.ixx> |
2 | #include <IGESBasic_Protocol.hxx> |
3 | #include <IGESBasic_GeneralModule.hxx> |
4 | #include <IGESBasic_ReadWriteModule.hxx> |
5 | #include <IGESBasic_SpecificModule.hxx> |
6 | #include <Interface_GeneralLib.hxx> |
7 | #include <Interface_ReaderLib.hxx> |
8 | #include <IGESData_WriterLib.hxx> |
9 | #include <IGESData_SpecificLib.hxx> |
10 | #include <IGESData.hxx> |
11 | |
12 | // Ancillary data to work on a Package of IGES Entities with a Protocol |
13 | // (Modules are created and loaded in appropriate libraries, once by Init) |
14 | |
15 | static Handle(IGESBasic_Protocol) protocol; |
16 | |
17 | |
18 | void IGESBasic::Init () |
19 | { |
20 | IGESData::Init(); // usefull for Undefined Type or Erroneous Entities |
21 | if (protocol.IsNull()) { |
22 | protocol = new IGESBasic_Protocol; |
23 | Interface_GeneralLib::SetGlobal (new IGESBasic_GeneralModule, protocol); |
24 | Interface_ReaderLib::SetGlobal (new IGESBasic_ReadWriteModule,protocol); |
25 | IGESData_WriterLib::SetGlobal (new IGESBasic_ReadWriteModule,protocol); |
26 | IGESData_SpecificLib::SetGlobal (new IGESBasic_SpecificModule, protocol); |
27 | } |
28 | } |
29 | |
30 | Handle(IGESBasic_Protocol) IGESBasic::Protocol () |
31 | { |
32 | return protocol; |
33 | } |