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 : SMDS_MeshGroup.hxx
26 #ifndef _SMDS_MeshGroup_HeaderFile
27 #define _SMDS_MeshGroup_HeaderFile
29 #ifndef _Standard_HeaderFile
30 #include <Standard.hxx>
32 #ifndef _Handle_SMDS_MeshGroup_HeaderFile
33 #include "Handle_SMDS_MeshGroup.hxx"
36 #ifndef _Handle_SMDS_Mesh_HeaderFile
37 #include "Handle_SMDS_Mesh.hxx"
39 #ifndef _SMDSAbs_ElementType_HeaderFile
40 #include "SMDSAbs_ElementType.hxx"
42 #ifndef _SMDS_MapOfMeshElement_HeaderFile
43 #include "SMDS_MapOfMeshElement.hxx"
45 #ifndef _Handle_SMDS_MeshGroup_HeaderFile
46 #include "Handle_SMDS_MeshGroup.hxx"
48 #ifndef _SMDS_ListOfMeshGroup_HeaderFile
49 #include "SMDS_ListOfMeshGroup.hxx"
51 #ifndef _SMDS_MeshObject_HeaderFile
52 #include "SMDS_MeshObject.hxx"
54 #ifndef _Standard_Boolean_HeaderFile
55 #include <Standard_Boolean.hxx>
57 #ifndef _Handle_SMDS_MeshElement_HeaderFile
58 #include "Handle_SMDS_MeshElement.hxx"
60 #ifndef _Standard_Integer_HeaderFile
61 #include <Standard_Integer.hxx>
64 class Standard_NoSuchObject;
65 class Standard_TypeMismatch;
66 class SMDS_MeshElement;
67 class SMDS_MapOfMeshElement;
70 class SMDS_MeshGroup : public SMDS_MeshObject {
74 inline void* operator new(size_t,void* anAddress)
78 inline void* operator new(size_t size)
80 return Standard::Allocate(size);
82 inline void operator delete(void *anAddress)
84 if (anAddress) Standard::Free((Standard_Address&)anAddress);
86 // inline void operator delete(void *anAddress, size_t size)
88 // if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
92 Standard_EXPORT SMDS_MeshGroup(const Handle(SMDS_Mesh)& aMesh);
93 Standard_EXPORT Handle_SMDS_MeshGroup AddSubGroup() ;
94 Standard_EXPORT virtual Standard_Boolean RemoveSubGroup(const Handle(SMDS_MeshGroup)& aGroup) ;
95 Standard_EXPORT virtual Standard_Boolean RemoveFromParent() ;
96 Standard_EXPORT void Clear() ;
97 Standard_EXPORT void Add(const Handle(SMDS_MeshElement)& ME) ;
98 Standard_EXPORT void Remove(const Handle(SMDS_MeshElement)& ME) ;
99 Standard_EXPORT Standard_Boolean IsEmpty() const;
100 Standard_EXPORT Standard_Integer Extent() const;
101 Standard_EXPORT SMDSAbs_ElementType Type() const;
102 Standard_EXPORT Standard_Boolean Contains(const Handle(SMDS_MeshElement)& ME) const;
103 Standard_EXPORT inline const SMDS_MapOfMeshElement& Elements() const;
104 Standard_EXPORT ~SMDS_MeshGroup();
111 Standard_EXPORT friend Handle_Standard_Type& SMDS_MeshGroup_Type_();
112 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
113 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
129 Standard_EXPORT SMDS_MeshGroup(const Handle(SMDS_MeshGroup)& parent);
134 Handle_SMDS_Mesh myMesh;
135 SMDSAbs_ElementType myType;
136 SMDS_MapOfMeshElement myElements;
137 Handle_SMDS_MeshGroup myParent;
138 SMDS_ListOfMeshGroup myChildren;
144 #include "SMDS_MeshGroup.lxx"
148 // other inline functions and methods (like "C++: function call" methods)