00001 00002 // exotkAF_Document.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_Document_HeaderFile 00029 #define _exotkAF_Document_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_Document_HeaderFile 00039 #include <Handle_exotkAF_Document.hxx> 00040 #endif 00041 00042 #ifndef _Handle_exotkAIS_DisplayManager_HeaderFile 00043 #include <Handle_exotkAIS_DisplayManager.hxx> 00044 #endif 00045 #ifndef _Handle_exotkAF_HSetOfView_HeaderFile 00046 #include <Handle_exotkAF_HSetOfView.hxx> 00047 #endif 00048 #ifndef _Aspect_Handle_HeaderFile 00049 #include <Aspect_Handle.hxx> 00050 #endif 00051 #ifndef _TCollection_AsciiString_HeaderFile 00052 #include <TCollection_AsciiString.hxx> 00053 #endif 00054 #ifndef _Handle_exotkTree_Tree_HeaderFile 00055 #include <Handle_exotkTree_Tree.hxx> 00056 #endif 00057 #ifndef _Handle_exotkAF_View_HeaderFile 00058 #include <Handle_exotkAF_View.hxx> 00059 #endif 00060 00061 #ifndef _Handle_TopTools_HSequenceOfShape_HeaderFile 00062 #include <Handle_TopTools_HSequenceOfShape.hxx> 00063 #endif 00064 00065 class TopoDS_Shape; 00066 00072 class exotkAF_Document : public MMgt_TShared 00073 { 00074 public: 00075 00083 inline void* operator new(size_t,void* anAddress) 00084 { 00085 return anAddress; 00086 } 00087 00094 inline void* operator new(size_t size) 00095 { 00096 return Standard::Allocate(size); 00097 } 00098 00105 inline void operator delete(void *anAddress) 00106 { 00107 if (anAddress) Standard::Free((Standard_Address&)anAddress); 00108 } 00109 00114 Standard_EXPORT exotkAF_Document(); 00115 00120 Standard_EXPORT virtual ~exotkAF_Document(); 00121 00122 00123 00130 Standard_EXPORT virtual Standard_Boolean SetActiveView(const Handle_exotkAF_View& aView); 00131 00137 Standard_EXPORT virtual Handle_exotkAF_View ActiveView(); 00138 00144 Standard_EXPORT virtual Handle_exotkTree_Tree Tree(); 00150 Standard_EXPORT virtual void SetName(const TCollection_AsciiString& aName); 00151 00157 Standard_EXPORT virtual TCollection_AsciiString Name(); 00158 00159 00165 Standard_EXPORT virtual Standard_Boolean Init(); 00166 00173 Standard_EXPORT virtual Handle_exotkAF_View CreateView(const Aspect_Handle& anHandle); 00174 00175 00183 Standard_EXPORT virtual Standard_Boolean AddShape(const TopoDS_Shape& aShapeToAdd,const TCollection_AsciiString& aName); 00190 Standard_EXPORT virtual Standard_Boolean OpenFile(const TCollection_AsciiString& aFilename); 00191 00192 00199 Standard_EXPORT virtual Standard_Boolean RemoveView(const Handle_exotkAF_View& aView); 00200 00206 Standard_EXPORT virtual Standard_Integer NbViews(); 00207 00212 Standard_EXPORT virtual void InitViewIterator(); 00213 00219 Standard_EXPORT virtual Standard_Boolean MoreViewIterator(); 00220 00225 Standard_EXPORT virtual void NextViewIterator(); 00226 00232 Standard_EXPORT virtual Handle_exotkAF_View CurrentViewIterator(); 00233 00234 00241 Standard_EXPORT virtual Standard_Boolean SaveFile(const TCollection_AsciiString& aFilename); 00242 00243 00249 Standard_EXPORT Handle_exotkAIS_DisplayManager DisplayManager(); 00250 00256 Standard_EXPORT friend Handle_Standard_Type& exotkAF_Document_Type_(); 00257 00263 Standard_EXPORT const Handle_Standard_Type& DynamicType() const; 00264 00271 Standard_EXPORT Standard_Boolean IsKind(const Handle_Standard_Type&) const; 00272 00273 protected: 00280 Standard_EXPORT virtual Standard_Boolean AddView(const Handle_exotkAF_View& aView); 00281 00283 Handle_exotkAIS_DisplayManager myDisplayManager; 00284 00286 Handle_exotkAF_HSetOfView myViews; 00287 00289 Handle_exotkAF_View myActiveView; 00290 00292 TCollection_AsciiString myName; 00293 00295 Standard_Boolean myIsInitialized; 00296 00298 Handle_exotkTree_Tree myTree; 00299 00301 Handle_TopTools_HSequenceOfShape myShapes; 00302 }; 00303 00304 #endif
1.2.12 written by Dimitri van Heesch,
© 1997-2001