Salome HOME
Remove Opencascade dependencies
[modules/smesh.git] / src / SMDS / SMDS_HSequenceOfMesh.hxx
1 //  SMESH SMDS : implementaion of Salome mesh data structure
2 //
3 //  Copyright (C) 2003  OPEN CASCADE
4 // 
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. 
9 // 
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. 
14 // 
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 
18 // 
19 //  See http://www.opencascade.org or email : webmaster@opencascade.org 
20 //
21 //
22 //
23 //  File   : SMDS_HSequenceOfMesh.hxx
24 //  Module : SMESH
25
26 #ifndef _SMDS_HSequenceOfMesh_HeaderFile
27 #define _SMDS_HSequenceOfMesh_HeaderFile
28
29 #ifndef _Standard_HeaderFile
30 #include <Standard.hxx>
31 #endif
32 #ifndef _Handle_SMDS_HSequenceOfMesh_HeaderFile
33 #include "Handle_SMDS_HSequenceOfMesh.hxx"
34 #endif
35
36 #ifndef _SMDS_SequenceOfMesh_HeaderFile
37 #include "SMDS_SequenceOfMesh.hxx"
38 #endif
39 #ifndef _MMgt_TShared_HeaderFile
40 #include <MMgt_TShared.hxx>
41 #endif
42 #ifndef _Handle_SMDS_Mesh_HeaderFile
43 #include "Handle_SMDS_Mesh.hxx"
44 #endif
45 #ifndef _Standard_Boolean_HeaderFile
46 #include <Standard_Boolean.hxx>
47 #endif
48 #ifndef _Standard_Integer_HeaderFile
49 #include <Standard_Integer.hxx>
50 #endif
51 class Standard_NoSuchObject;
52 class Standard_OutOfRange;
53 class SMDS_Mesh;
54 class SMDS_SequenceOfMesh;
55
56
57 class SMDS_HSequenceOfMesh : public MMgt_TShared {
58
59 public:
60
61     inline void* operator new(size_t,void* anAddress) 
62       {
63         return anAddress;
64       }
65     inline void* operator new(size_t size) 
66       { 
67         return Standard::Allocate(size); 
68       }
69     inline void  operator delete(void *anAddress) 
70       { 
71         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
72       }
73 //    inline void  operator delete(void *anAddress, size_t size) 
74 //      { 
75 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
76 //      }
77  // Methods PUBLIC
78  // 
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();
103
104
105
106
107  // Type management
108  //
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;
112
113 protected:
114
115  // Methods PROTECTED
116  // 
117
118
119  // Fields PROTECTED
120  //
121
122
123 private: 
124
125  // Methods PRIVATE
126  // 
127
128
129  // Fields PRIVATE
130  //
131 SMDS_SequenceOfMesh mySequence;
132
133
134 };
135
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_()
144
145 #include <TCollection_HSequence.lxx>
146
147 #undef Item
148 #undef Item_hxx
149 #undef TheSequence
150 #undef TheSequence_hxx
151 #undef TCollection_HSequence
152 #undef TCollection_HSequence_hxx
153 #undef Handle_TCollection_HSequence
154 #undef TCollection_HSequence_Type_
155
156
157 // other inline functions and methods (like "C++: function call" methods)
158 //
159 inline Handle_SMDS_HSequenceOfMesh ShallowCopy(const Handle_SMDS_HSequenceOfMesh& me) {
160  return me->ShallowCopy();
161 }
162
163
164
165 #endif