00001 00002 // exotkAF_Application.hxx 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 #ifndef _exotkAF_Application_HeaderFile 00029 #define _exotkAF_Application_HeaderFile 00030 00031 #if _MSC_VER > 1000 00032 #pragma once 00033 #endif // _MSC_VER > 1000 00034 00035 #ifndef _MMgt_TShared_HeaderFile 00036 #include <MMgt_TShared.hxx> 00037 #endif 00038 #ifndef _Handle_exotkAF_Application_HeaderFile 00039 #include <Handle_exotkAF_Application.hxx> 00040 #endif 00041 #ifndef _Handle_exotkGUI_GUI_HeaderFile 00042 #include <Handle_exotkGUI_GUI.hxx> 00043 #endif 00044 #ifndef _Handle_exotkAF_HSetOfDocument_HeaderFile 00045 #include <Handle_exotkAF_HSetOfDocument.hxx> 00046 #endif 00047 00048 #ifndef _TCollection_AsciiString_HeaderFile 00049 #include <TCollection_AsciiString.hxx> 00050 #endif 00051 #ifndef _Handle_exotkAF_Document_HeaderFile 00052 #include <Handle_exotkAF_Document.hxx> 00053 #endif 00054 class Handle_exotkPlugin_Plugin; 00055 00061 class exotkAF_Application : public MMgt_TShared 00062 { 00063 public: 00064 00072 inline void* operator new(size_t,void* anAddress) 00073 { 00074 return anAddress; 00075 } 00076 00083 inline void* operator new(size_t size) 00084 { 00085 return Standard::Allocate(size); 00086 } 00087 00094 inline void operator delete(void *anAddress) 00095 { 00096 if (anAddress) Standard::Free((Standard_Address&)anAddress); 00097 } 00102 Standard_EXPORT exotkAF_Application(); 00103 00108 Standard_EXPORT virtual ~exotkAF_Application(); 00109 00110 00111 00118 Standard_EXPORT virtual Standard_Boolean SetActiveDocument(const Handle_exotkAF_Document& aDocument); 00119 00125 Standard_EXPORT virtual Handle_exotkAF_Document ActiveDocument(); 00126 00133 Standard_EXPORT virtual Standard_Boolean AddDocument(const Handle_exotkAF_Document& aDocument); 00134 00141 Standard_EXPORT virtual Standard_Boolean RemoveDocument(const Handle_exotkAF_Document& aDocument); 00142 00148 Standard_EXPORT virtual Standard_Integer NbDocuments(); 00149 00154 Standard_EXPORT virtual void InitDocIterator(); 00155 00161 Standard_EXPORT virtual Standard_Boolean MoreDocIterator(); 00162 00167 Standard_EXPORT virtual void NextDocIterator(); 00168 00174 Standard_EXPORT virtual Handle_exotkAF_Document CurrentDocIterator(); 00175 00176 00187 Standard_EXPORT virtual Standard_Boolean SetOpenCASCADEEnvironmentVariables(const TCollection_AsciiString& aCSFGraphicShr, const TCollection_AsciiString& aCSFUnitsDefinition , const TCollection_AsciiString& aCSFUnitsLexicon , const TCollection_AsciiString& aCSFMDTVFontDirectory , const TCollection_AsciiString& aCSFMDTVTexturesDirectory); 00188 00189 00196 Standard_EXPORT virtual Standard_Boolean SetPluginPath(const TCollection_AsciiString& aPluginPath); 00197 00203 Standard_EXPORT virtual TCollection_AsciiString PluginPath(); 00204 00205 00211 Standard_EXPORT virtual Standard_Boolean LoadPlugins(); 00212 00213 00219 Standard_EXPORT friend Handle_Standard_Type& exotkAF_Document_Type_(); 00220 00226 Standard_EXPORT const Handle_Standard_Type& DynamicType() const; 00227 00234 Standard_EXPORT Standard_Boolean IsKind(const Handle_Standard_Type&) const; 00235 00236 private: 00238 Handle_exotkAF_HSetOfDocument myDocuments; 00239 00241 Handle_exotkAF_Document myActiveDocument; 00242 00244 TCollection_AsciiString myPluginPath; 00245 protected: 00246 00252 Standard_EXPORT virtual void DispatchPlugin(const Handle_exotkPlugin_Plugin& aPlugin); 00253 }; 00254 00255 #endif // !defined(AFX_EXOTKAF_APPLICATION_HXX__56D7BD44_6BD6_4D37_87AA_438533ABF82C__INCLUDED_)
1.2.12 written by Dimitri van Heesch,
© 1997-2001