Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

exotkAIS_GraphicDevice.cxx

Go to the documentation of this file.
00001 
00002 //   exotkAIS_GraphicDevice.cxx
00004 //    Copyright (C) 2001  Stephane Routelous
00005 //
00006 //    This file is part of exoTK.
00007 //
00008 //    exoTK is free software; you can redistribute it and/or modify
00009 //    it under the terms of the GNU General Public License as published by
00010 //    the Free Software Foundation; either version 2 of the License, or
00011 //    (at your option) any later version.
00012 //
00013 //    exoTK is distributed in the hope that it will be useful,
00014 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 //    GNU General Public License for more details.
00017 //
00018 //    You should have received a copy of the GNU General Public License
00019 //    along with exoTK; if not, write to the Free Software
00020 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00028 #include <exotkAIS_GraphicDevice.hxx>
00029 
00030 #ifdef WNT
00031 #ifndef _Graphic3d_WNTGraphicDevice_HeaderFile
00032 #include <Graphic3d_WNTGraphicDevice.hxx>
00033 #endif
00034 #else
00035 #ifndef _Graphic3d_GraphicDevice_HeaderFile
00036 #include <Graphic3d_GraphicDevice.hxx>
00037 #endif
00038 #endif
00039 exotkAIS_GraphicDevice* exotkAIS_GraphicDevice::_instance = 0;
00040 
00041 
00042 //==================================================================================
00043 // Function name        : exotkAIS_GraphicDevice::exotkAIS_GraphicDevice
00044 //==================================================================================
00045 // Written by       : Stephane Routelous - 2001-11-07 19:16:10
00046 // Description      : 
00047 // Return type          : 
00048 //==================================================================================
00049 exotkAIS_GraphicDevice::exotkAIS_GraphicDevice()
00050 {
00051 }
00052 
00053 
00054 //==================================================================================
00055 // Function name        : exotkAIS_GraphicDevice::~exotkAIS_GraphicDevice
00056 //==================================================================================
00057 // Written by       : Stephane Routelous - 2001-11-07 19:16:11
00058 // Description      : 
00059 // Return type          : 
00060 //==================================================================================
00061 exotkAIS_GraphicDevice::~exotkAIS_GraphicDevice()
00062 {
00063 }
00064 
00065 //==================================================================================
00066 // Function name        : exotkAIS_GraphicDevice::Instance
00067 //==================================================================================
00068 // Written by       : Stephane Routelous - 2001-11-07 19:16:13
00069 // Description      : 
00070 // Return type          : exotkAIS_GraphicDevice* 
00071 //==================================================================================
00072 exotkAIS_GraphicDevice* exotkAIS_GraphicDevice::Instance()
00073 {
00074         if (_instance == 0)
00075         {
00076                 _instance = new exotkAIS_GraphicDevice();
00077         }
00078         return _instance;
00079 }
00080 
00081 //==================================================================================
00082 // Function name        : exotkAIS_GraphicDevice::GetGraphicDevice
00083 //==================================================================================
00084 // Written by       : Stephane Routelous - 2001-11-07 19:16:17
00085 // Description      : 
00086 // Return type          : Handle_Aspect_GraphicDevice& 
00087 //==================================================================================
00088 Handle_Aspect_GraphicDevice& exotkAIS_GraphicDevice::GetGraphicDevice()
00089 {
00090         if (myGraphicDevice.IsNull())
00091         {
00092                 CreateGraphicDevice();
00093         }
00094         return myGraphicDevice;
00095 }
00096 
00097 //==================================================================================
00098 // Function name        : exotkAIS_GraphicDevice::CreateGraphicDevice
00099 //==================================================================================
00100 // Written by       : Stephane Routelous - 2001-11-07 19:16:15
00101 // Description      : 
00102 // Return type          : void 
00103 //==================================================================================
00104 void exotkAIS_GraphicDevice::CreateGraphicDevice()
00105 {
00106         try
00107         {
00108 #ifdef WNT
00109                 myGraphicDevice = new Graphic3d_WNTGraphicDevice();
00110 #else
00111                 myGraphciDevice = new Graphic3d_GraphicDevice("");
00112 #endif
00113         }
00114         catch (Standard_Failure) 
00115         {
00116         }
00117         catch (...)
00118         {
00119         }
00120 }

Generated on Wed Jan 23 12:16:41 2002 for exotk by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001