9662352b6d0c78ff8b1eba7611213347195bac6b
[occt.git] / src / DPrsStd / DPrsStd.cxx
1 // Created on: 1998-06-29
2 // Created by: Denis PASCAL
3 // Copyright (c) 1998-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17
18 #include <AppStd_Application.hxx>
19 #include <DDataStd.hxx>
20 #include <DDF.hxx>
21 #include <DDocStd.hxx>
22 #include <DNaming.hxx>
23 #include <DPrsStd.hxx>
24 #include <Draw.hxx>
25 #include <Draw_Interpretor.hxx>
26 #include <Draw_PluginMacro.hxx>
27 #include <OSD_Directory.hxx>
28 #include <OSD_Environment.hxx>
29 #include <OSD_File.hxx>
30 #include <OSD_Path.hxx>
31 #include <TCollection_AsciiString.hxx>
32
33 // avoid warnings on 'extern "C"' functions returning C++ classes
34 #ifdef _MSC_VER
35 #pragma warning(4:4190)
36 #endif
37
38 //=======================================================================
39 //function : AllComands
40 //purpose  : 
41 //=======================================================================
42
43 void DPrsStd::AllCommands (Draw_Interpretor& theCommands)
44 {
45   static Standard_Boolean done = Standard_False;
46   if (done) return;
47   done = Standard_True;
48
49   DPrsStd::AISPresentationCommands(theCommands); 
50   DPrsStd::AISViewerCommands(theCommands);  
51   //DPrsStd::BasicCommands(theCommands);  
52 }
53
54 //==============================================================================
55 // DPrsStd::Factory
56 //==============================================================================
57 void DPrsStd::Factory(Draw_Interpretor& theDI)
58 {
59   static Standard_Boolean DPrsStdFactoryDone = Standard_False;
60   if (DPrsStdFactoryDone) return;
61   DPrsStdFactoryDone = Standard_True;
62
63   DDF::AllCommands(theDI);
64   DNaming::AllCommands(theDI);
65   DDataStd::AllCommands(theDI);  
66   DPrsStd::AllCommands(theDI);
67   DDocStd::AllCommands(theDI);
68 #ifdef OCCT_DEBUG
69   cout << "Draw Plugin : All DF commands are loaded" << endl;
70 #endif
71 }
72
73 // Declare entry point PLUGINFACTORY
74 DPLUGIN(DPrsStd)