00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // File : Handle_GEOM_Application.hxx 00024 // Module : GEOM 00025 // 00026 #ifndef _Handle_GEOM_Application_HeaderFile 00027 #define _Handle_GEOM_Application_HeaderFile 00028 00029 #ifndef _Standard_Macro_HeaderFile 00030 #include <Standard_Macro.hxx> 00031 #endif 00032 #ifndef _Standard_HeaderFile 00033 #include <Standard.hxx> 00034 #endif 00035 00036 #ifndef _Handle_TDocStd_Application_HeaderFile 00037 #include <Handle_TDocStd_Application.hxx> 00038 #endif 00039 00040 class Standard_Transient; 00041 class Handle_Standard_Type; 00042 class Handle(TDocStd_Application); 00043 class GEOM_Application; 00044 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SimpleOCAF_Application); 00045 00046 class Handle(GEOM_Application) : public Handle(TDocStd_Application) { 00047 public: 00048 inline void* operator new(size_t,void* anAddress) 00049 { 00050 return anAddress; 00051 } 00052 inline void* operator new(size_t size) 00053 { 00054 return Standard::Allocate(size); 00055 } 00056 inline void operator delete(void *anAddress) 00057 { 00058 if (anAddress) Standard::Free((Standard_Address&)anAddress); 00059 } 00060 // inline void operator delete(void *anAddress, size_t size) 00061 // { 00062 // if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 00063 // } 00064 Handle(GEOM_Application)():Handle(TDocStd_Application)() {} 00065 Handle(GEOM_Application)(const Handle(GEOM_Application)& aHandle) : Handle(TDocStd_Application)(aHandle) 00066 { 00067 } 00068 00069 Handle(GEOM_Application)(const GEOM_Application* anItem) : Handle(TDocStd_Application)((TDocStd_Application *)anItem) 00070 { 00071 } 00072 00073 Handle(GEOM_Application)& operator=(const Handle(GEOM_Application)& aHandle) 00074 { 00075 Assign(aHandle.Access()); 00076 return *this; 00077 } 00078 00079 Handle(GEOM_Application)& operator=(const GEOM_Application* anItem) 00080 { 00081 Assign((Standard_Transient *)anItem); 00082 return *this; 00083 } 00084 00085 GEOM_Application* operator->() 00086 { 00087 return (GEOM_Application *)ControlAccess(); 00088 } 00089 00090 GEOM_Application* operator->() const 00091 { 00092 return (GEOM_Application *)ControlAccess(); 00093 } 00094 00095 Standard_EXPORT ~Handle(GEOM_Application)(); 00096 00097 Standard_EXPORT static const Handle(GEOM_Application) DownCast(const Handle(Standard_Transient)& AnObject); 00098 }; 00099 #endif