7fd59977 |
1 | #include <IGESSolid.ixx> |
2 | #include <IGESSolid_Protocol.hxx> |
3 | #include <IGESSolid_GeneralModule.hxx> |
4 | #include <IGESSolid_ReadWriteModule.hxx> |
5 | #include <IGESSolid_SpecificModule.hxx> |
6 | #include <Interface_GeneralLib.hxx> |
7 | #include <Interface_ReaderLib.hxx> |
8 | #include <IGESData_WriterLib.hxx> |
9 | #include <IGESData_SpecificLib.hxx> |
10 | #include <IGESGeom.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(IGESSolid_Protocol) protocol; |
16 | |
17 | |
18 | |
19 | void IGESSolid::Init () |
20 | { |
21 | IGESGeom::Init(); |
22 | if (protocol.IsNull()) { |
23 | protocol = new IGESSolid_Protocol; |
24 | Interface_GeneralLib::SetGlobal (new IGESSolid_GeneralModule, protocol); |
25 | Interface_ReaderLib::SetGlobal (new IGESSolid_ReadWriteModule,protocol); |
26 | IGESData_WriterLib::SetGlobal (new IGESSolid_ReadWriteModule,protocol); |
27 | IGESData_SpecificLib::SetGlobal (new IGESSolid_SpecificModule, protocol); |
28 | } |
29 | } |
30 | |
31 | Handle(IGESSolid_Protocol) IGESSolid::Protocol () |
32 | { |
33 | return protocol; |
34 | } |