Salome HOME
Add a ChangeLog file
[modules/smesh.git] / src / SMDS / SMDS_SequenceOfMesh.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_SequenceOfMesh.hxx
24 //  Module : SMESH
25
26 #ifndef _SMDS_SequenceOfMesh_HeaderFile
27 #define _SMDS_SequenceOfMesh_HeaderFile
28
29 #ifndef _TCollection_BaseSequence_HeaderFile
30 #include <TCollection_BaseSequence.hxx>
31 #endif
32 #ifndef _Handle_SMDS_Mesh_HeaderFile
33 #include "Handle_SMDS_Mesh.hxx"
34 #endif
35 #ifndef _Handle_SMDS_SequenceNodeOfSequenceOfMesh_HeaderFile
36 #include "Handle_SMDS_SequenceNodeOfSequenceOfMesh.hxx"
37 #endif
38 #ifndef _Standard_Integer_HeaderFile
39 #include <Standard_Integer.hxx>
40 #endif
41 class Standard_NoSuchObject;
42 class Standard_OutOfRange;
43 class SMDS_Mesh;
44 class SMDS_SequenceNodeOfSequenceOfMesh;
45
46
47 #ifndef _Standard_HeaderFile
48 #include <Standard.hxx>
49 #endif
50 #ifndef _Standard_Macro_HeaderFile
51 #include <Standard_Macro.hxx>
52 #endif
53
54 class SMDS_SequenceOfMesh  : public TCollection_BaseSequence {
55
56 public:
57
58     inline void* operator new(size_t,void* anAddress) 
59       {
60         return anAddress;
61       }
62     inline void* operator new(size_t size) 
63       { 
64         return Standard::Allocate(size); 
65       }
66     inline void  operator delete(void *anAddress) 
67       { 
68         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
69       }
70 //    inline void  operator delete(void *anAddress, size_t size) 
71 //      { 
72 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
73 //      }
74  // Methods PUBLIC
75  // 
76 Standard_EXPORT inline SMDS_SequenceOfMesh();
77 Standard_EXPORT   void Clear() ;
78 ~SMDS_SequenceOfMesh()
79 {
80   Clear();
81 }
82
83 Standard_EXPORT  const SMDS_SequenceOfMesh& Assign(const SMDS_SequenceOfMesh& Other) ;
84  const SMDS_SequenceOfMesh& operator =(const SMDS_SequenceOfMesh& Other) 
85 {
86   return Assign(Other);
87 }
88
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
102 {
103   return Value(Index);
104 }
105
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) 
109 {
110   return ChangeValue(Index);
111 }
112
113 Standard_EXPORT   void Remove(const Standard_Integer Index) ;
114 Standard_EXPORT   void Remove(const Standard_Integer FromIndex,const Standard_Integer ToIndex) ;
115
116
117
118
119
120 protected:
121
122  // Methods PROTECTED
123  // 
124
125
126  // Fields PROTECTED
127  //
128
129
130 private: 
131
132  // Methods PRIVATE
133  // 
134 Standard_EXPORT SMDS_SequenceOfMesh(const SMDS_SequenceOfMesh& Other);
135
136
137  // Fields PRIVATE
138  //
139
140
141 };
142
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"
151
152 #include <TCollection_Sequence.lxx>
153
154 #undef SeqItem
155 #undef SeqItem_hxx
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
162
163
164 // other inline functions and methods (like "C++: function call" methods)
165 //
166
167
168 #endif