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_HSequenceOfMesh.hxx
26 #ifndef _SMDS_HSequenceOfMesh_HeaderFile
27 #define _SMDS_HSequenceOfMesh_HeaderFile
29 #ifndef _Standard_HeaderFile
30 #include <Standard.hxx>
32 #ifndef _Handle_SMDS_HSequenceOfMesh_HeaderFile
33 #include "Handle_SMDS_HSequenceOfMesh.hxx"
36 #ifndef _SMDS_SequenceOfMesh_HeaderFile
37 #include "SMDS_SequenceOfMesh.hxx"
39 #ifndef _MMgt_TShared_HeaderFile
40 #include <MMgt_TShared.hxx>
42 #ifndef _Handle_SMDS_Mesh_HeaderFile
43 #include "Handle_SMDS_Mesh.hxx"
45 #ifndef _Standard_Boolean_HeaderFile
46 #include <Standard_Boolean.hxx>
48 #ifndef _Standard_Integer_HeaderFile
49 #include <Standard_Integer.hxx>
51 class Standard_NoSuchObject;
52 class Standard_OutOfRange;
54 class SMDS_SequenceOfMesh;
57 class SMDS_HSequenceOfMesh : public MMgt_TShared {
61 inline void* operator new(size_t,void* anAddress)
65 inline void* operator new(size_t size)
67 return Standard::Allocate(size);
69 inline void operator delete(void *anAddress)
71 if (anAddress) Standard::Free((Standard_Address&)anAddress);
73 // inline void operator delete(void *anAddress, size_t size)
75 // if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
79 Standard_EXPORT inline SMDS_HSequenceOfMesh();
80 Standard_EXPORT inline Standard_Boolean IsEmpty() const;
81 Standard_EXPORT inline Standard_Integer Length() const;
82 Standard_EXPORT void Clear() ;
83 Standard_EXPORT void Append(const Handle(SMDS_Mesh)& anItem) ;
84 Standard_EXPORT void Append(const Handle(SMDS_HSequenceOfMesh)& aSequence) ;
85 Standard_EXPORT void Prepend(const Handle(SMDS_Mesh)& anItem) ;
86 Standard_EXPORT void Prepend(const Handle(SMDS_HSequenceOfMesh)& aSequence) ;
87 Standard_EXPORT void Reverse() ;
88 Standard_EXPORT void InsertBefore(const Standard_Integer anIndex,const Handle(SMDS_Mesh)& anItem) ;
89 Standard_EXPORT void InsertBefore(const Standard_Integer anIndex,const Handle(SMDS_HSequenceOfMesh)& aSequence) ;
90 Standard_EXPORT void InsertAfter(const Standard_Integer anIndex,const Handle(SMDS_Mesh)& anItem) ;
91 Standard_EXPORT void InsertAfter(const Standard_Integer anIndex,const Handle(SMDS_HSequenceOfMesh)& aSequence) ;
92 Standard_EXPORT void Exchange(const Standard_Integer anIndex,const Standard_Integer anOtherIndex) ;
93 Standard_EXPORT Handle_SMDS_HSequenceOfMesh Split(const Standard_Integer anIndex) ;
94 Standard_EXPORT void SetValue(const Standard_Integer anIndex,const Handle(SMDS_Mesh)& anItem) ;
95 Standard_EXPORT const Handle_SMDS_Mesh& Value(const Standard_Integer anIndex) const;
96 Standard_EXPORT Handle_SMDS_Mesh& ChangeValue(const Standard_Integer anIndex) ;
97 Standard_EXPORT void Remove(const Standard_Integer anIndex) ;
98 Standard_EXPORT void Remove(const Standard_Integer fromIndex,const Standard_Integer toIndex) ;
99 Standard_EXPORT inline const SMDS_SequenceOfMesh& Sequence() const;
100 Standard_EXPORT inline SMDS_SequenceOfMesh& ChangeSequence() ;
101 Standard_EXPORT Handle_SMDS_HSequenceOfMesh ShallowCopy() const;
102 Standard_EXPORT ~SMDS_HSequenceOfMesh();
109 Standard_EXPORT friend Handle_Standard_Type& SMDS_HSequenceOfMesh_Type_();
110 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
111 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
131 SMDS_SequenceOfMesh mySequence;
136 #define Item Handle_SMDS_Mesh
137 #define Item_hxx "SMDS_Mesh.hxx"
138 #define TheSequence SMDS_SequenceOfMesh
139 #define TheSequence_hxx "SMDS_SequenceOfMesh.hxx"
140 #define TCollection_HSequence SMDS_HSequenceOfMesh
141 #define TCollection_HSequence_hxx "SMDS_HSequenceOfMesh.hxx"
142 #define Handle_TCollection_HSequence Handle_SMDS_HSequenceOfMesh
143 #define TCollection_HSequence_Type_() SMDS_HSequenceOfMesh_Type_()
145 #include <TCollection_HSequence.lxx>
150 #undef TheSequence_hxx
151 #undef TCollection_HSequence
152 #undef TCollection_HSequence_hxx
153 #undef Handle_TCollection_HSequence
154 #undef TCollection_HSequence_Type_
157 // other inline functions and methods (like "C++: function call" methods)
159 inline Handle_SMDS_HSequenceOfMesh ShallowCopy(const Handle_SMDS_HSequenceOfMesh& me) {
160 return me->ShallowCopy();