1 // SMESH SMDS : implementaion of Salome mesh data structure
3 // Copyright (C) 2003 OPEN CASCADE
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.opencascade.org or email : webmaster@opencascade.org
23 // File : Handle_SMDS_MeshGroup.hxx
26 #ifndef _Handle_SMDS_MeshGroup_HeaderFile
27 #define _Handle_SMDS_MeshGroup_HeaderFile
29 #ifndef _Standard_Macro_HeaderFile
30 #include <Standard_Macro.hxx>
32 #ifndef _Standard_HeaderFile
33 #include <Standard.hxx>
36 #ifndef _Handle_SMDS_MeshObject_HeaderFile
37 #include "Handle_SMDS_MeshObject.hxx"
40 class Standard_Transient;
41 class Handle_Standard_Type;
42 class Handle(SMDS_MeshObject);
44 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SMDS_MeshGroup);
46 class Handle(SMDS_MeshGroup) : public Handle(SMDS_MeshObject) {
48 inline void* operator new(size_t,void* anAddress)
52 inline void* operator new(size_t size)
54 return Standard::Allocate(size);
56 inline void operator delete(void *anAddress)
58 if (anAddress) Standard::Free((Standard_Address&)anAddress);
60 // inline void operator delete(void *anAddress, size_t size)
62 // if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
64 Handle(SMDS_MeshGroup)():Handle(SMDS_MeshObject)() {}
65 Handle(SMDS_MeshGroup)(const Handle(SMDS_MeshGroup)& aHandle) : Handle(SMDS_MeshObject)(aHandle)
69 Handle(SMDS_MeshGroup)(const SMDS_MeshGroup* anItem) : Handle(SMDS_MeshObject)((SMDS_MeshObject *)anItem)
73 Handle(SMDS_MeshGroup)& operator=(const Handle(SMDS_MeshGroup)& aHandle)
75 Assign(aHandle.Access());
79 Handle(SMDS_MeshGroup)& operator=(const SMDS_MeshGroup* anItem)
81 Assign((Standard_Transient *)anItem);
85 SMDS_MeshGroup* operator->()
87 return (SMDS_MeshGroup *)ControlAccess();
90 SMDS_MeshGroup* operator->() const
92 return (SMDS_MeshGroup *)ControlAccess();
95 Standard_EXPORT ~Handle(SMDS_MeshGroup)();
97 Standard_EXPORT static const Handle(SMDS_MeshGroup) DownCast(const Handle(Standard_Transient)& AnObject);