0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IGESDimen / IGESDimen.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <IGESData_SpecificLib.hxx>
16 #include <IGESData_WriterLib.hxx>
17 #include <IGESDimen.hxx>
18 #include <IGESDimen_GeneralModule.hxx>
19 #include <IGESDimen_Protocol.hxx>
20 #include <IGESDimen_ReadWriteModule.hxx>
21 #include <IGESDimen_SpecificModule.hxx>
22 #include <IGESGeom.hxx>
23 #include <IGESGraph.hxx>
24 #include <Interface_GeneralLib.hxx>
25 #include <Interface_ReaderLib.hxx>
26
27 //  Ancillary data to work on a Package of IGES Entities with a Protocol
28 //  (Modules are created and loaded in appropriate libraries, once by Init)
29 static Handle(IGESDimen_Protocol) protocol;
30
31
32     void  IGESDimen::Init ()
33 {
34   IGESGeom::Init();
35   IGESGraph::Init();
36   if (protocol.IsNull()) {
37     protocol = new IGESDimen_Protocol;
38     Interface_GeneralLib::SetGlobal (new IGESDimen_GeneralModule,  protocol);
39     Interface_ReaderLib::SetGlobal  (new IGESDimen_ReadWriteModule,protocol);
40     IGESData_WriterLib::SetGlobal   (new IGESDimen_ReadWriteModule,protocol);
41     IGESData_SpecificLib::SetGlobal (new IGESDimen_SpecificModule, protocol);
42   }
43 }
44
45     Handle(IGESDimen_Protocol)  IGESDimen::Protocol ()
46 {
47   return protocol;
48 }