summaryrefslogtreecommitdiff
path: root/src/IGESAppli/IGESAppli.cxx
blob: 52baf896668c81939d332ae7d5dbdfd44018942f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <IGESAppli.ixx>
#include <IGESAppli_Protocol.hxx>
#include <IGESAppli_GeneralModule.hxx>
#include <IGESAppli_ReadWriteModule.hxx>
#include <IGESAppli_SpecificModule.hxx>
#include <Interface_GeneralLib.hxx>
#include <Interface_ReaderLib.hxx>
#include <IGESData_WriterLib.hxx>
#include <IGESData_SpecificLib.hxx>
#include <IGESDefs.hxx>
#include <IGESDraw.hxx>


//  Ancillary data to work on a Package of IGES Entities with a Protocol
//  (Modules are created and loaded in appropriate libraries, once by Init)

static Handle(IGESAppli_Protocol) protocol;



    void  IGESAppli::Init ()
{
  IGESDefs::Init();
  IGESDraw::Init();
  if (protocol.IsNull()) {
    protocol = new IGESAppli_Protocol;
    Interface_GeneralLib::SetGlobal (new IGESAppli_GeneralModule,  protocol);
    Interface_ReaderLib::SetGlobal  (new IGESAppli_ReadWriteModule,protocol);
    IGESData_WriterLib::SetGlobal   (new IGESAppli_ReadWriteModule,protocol);
    IGESData_SpecificLib::SetGlobal (new IGESAppli_SpecificModule, protocol);
  }
}

    Handle(IGESAppli_Protocol)  IGESAppli::Protocol ()
{
  return protocol;
}