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_SequenceOfMesh.hxx
26 #ifndef _SMDS_SequenceOfMesh_HeaderFile
27 #define _SMDS_SequenceOfMesh_HeaderFile
29 #ifndef _TCollection_BaseSequence_HeaderFile
30 #include <TCollection_BaseSequence.hxx>
32 #ifndef _Handle_SMDS_Mesh_HeaderFile
33 #include "Handle_SMDS_Mesh.hxx"
35 #ifndef _Handle_SMDS_SequenceNodeOfSequenceOfMesh_HeaderFile
36 #include "Handle_SMDS_SequenceNodeOfSequenceOfMesh.hxx"
38 #ifndef _Standard_Integer_HeaderFile
39 #include <Standard_Integer.hxx>
41 class Standard_NoSuchObject;
42 class Standard_OutOfRange;
44 class SMDS_SequenceNodeOfSequenceOfMesh;
47 #ifndef _Standard_HeaderFile
48 #include <Standard.hxx>
50 #ifndef _Standard_Macro_HeaderFile
51 #include <Standard_Macro.hxx>
54 class SMDS_SequenceOfMesh : public TCollection_BaseSequence {
58 inline void* operator new(size_t,void* anAddress)
62 inline void* operator new(size_t size)
64 return Standard::Allocate(size);
66 inline void operator delete(void *anAddress)
68 if (anAddress) Standard::Free((Standard_Address&)anAddress);
70 // inline void operator delete(void *anAddress, size_t size)
72 // if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
76 Standard_EXPORT inline SMDS_SequenceOfMesh();
77 Standard_EXPORT void Clear() ;
78 ~SMDS_SequenceOfMesh()
83 Standard_EXPORT const SMDS_SequenceOfMesh& Assign(const SMDS_SequenceOfMesh& Other) ;
84 const SMDS_SequenceOfMesh& operator =(const SMDS_SequenceOfMesh& Other)
89 Standard_EXPORT void Append(const Handle(SMDS_Mesh)& T) ;
90 Standard_EXPORT inline void Append(SMDS_SequenceOfMesh& S) ;
91 Standard_EXPORT void Prepend(const Handle(SMDS_Mesh)& T) ;
92 Standard_EXPORT inline void Prepend(SMDS_SequenceOfMesh& S) ;
93 Standard_EXPORT inline void InsertBefore(const Standard_Integer Index,const Handle(SMDS_Mesh)& T) ;
94 Standard_EXPORT inline void InsertBefore(const Standard_Integer Index,SMDS_SequenceOfMesh& S) ;
95 Standard_EXPORT void InsertAfter(const Standard_Integer Index,const Handle(SMDS_Mesh)& T) ;
96 Standard_EXPORT inline void InsertAfter(const Standard_Integer Index,SMDS_SequenceOfMesh& S) ;
97 Standard_EXPORT const Handle_SMDS_Mesh& First() const;
98 Standard_EXPORT const Handle_SMDS_Mesh& Last() const;
99 Standard_EXPORT inline void Split(const Standard_Integer Index,SMDS_SequenceOfMesh& Sub) ;
100 Standard_EXPORT const Handle_SMDS_Mesh& Value(const Standard_Integer Index) const;
101 const Handle_SMDS_Mesh& operator()(const Standard_Integer Index) const
106 Standard_EXPORT void SetValue(const Standard_Integer Index,const Handle(SMDS_Mesh)& I) ;
107 Standard_EXPORT Handle_SMDS_Mesh& ChangeValue(const Standard_Integer Index) ;
108 Handle_SMDS_Mesh& operator()(const Standard_Integer Index)
110 return ChangeValue(Index);
113 Standard_EXPORT void Remove(const Standard_Integer Index) ;
114 Standard_EXPORT void Remove(const Standard_Integer FromIndex,const Standard_Integer ToIndex) ;
134 Standard_EXPORT SMDS_SequenceOfMesh(const SMDS_SequenceOfMesh& Other);
143 #define SeqItem Handle_SMDS_Mesh
144 #define SeqItem_hxx "SMDS_Mesh.hxx"
145 #define TCollection_SequenceNode SMDS_SequenceNodeOfSequenceOfMesh
146 #define TCollection_SequenceNode_hxx "SMDS_SequenceNodeOfSequenceOfMesh.hxx"
147 #define Handle_TCollection_SequenceNode Handle_SMDS_SequenceNodeOfSequenceOfMesh
148 #define TCollection_SequenceNode_Type_() SMDS_SequenceNodeOfSequenceOfMesh_Type_()
149 #define TCollection_Sequence SMDS_SequenceOfMesh
150 #define TCollection_Sequence_hxx "SMDS_SequenceOfMesh.hxx"
152 #include <TCollection_Sequence.lxx>
156 #undef TCollection_SequenceNode
157 #undef TCollection_SequenceNode_hxx
158 #undef Handle_TCollection_SequenceNode
159 #undef TCollection_SequenceNode_Type_
160 #undef TCollection_Sequence
161 #undef TCollection_Sequence_hxx
164 // other inline functions and methods (like "C++: function call" methods)