Salome HOME
New DS implementation
[modules/smesh.git] / src / SMDS / SMDS_ListOfMeshGroup.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_ListOfMeshGroup.hxx
24 //  Module : SMESH
25
26 #ifndef _SMDS_ListOfMeshGroup_HeaderFile
27 #define _SMDS_ListOfMeshGroup_HeaderFile
28
29 #ifndef _Standard_Address_HeaderFile
30 #include <Standard_Address.hxx>
31 #endif
32 #ifndef _Handle_SMDS_MeshGroup_HeaderFile
33 #include "Handle_SMDS_MeshGroup.hxx"
34 #endif
35 #ifndef _Handle_SMDS_ListNodeOfListOfMeshGroup_HeaderFile
36 #include "Handle_SMDS_ListNodeOfListOfMeshGroup.hxx"
37 #endif
38 #ifndef _Standard_Integer_HeaderFile
39 #include <Standard_Integer.hxx>
40 #endif
41 #ifndef _Standard_Boolean_HeaderFile
42 #include <Standard_Boolean.hxx>
43 #endif
44 class Standard_NoSuchObject;
45 class SMDS_ListIteratorOfListOfMeshGroup;
46 class SMDS_MeshGroup;
47 class SMDS_ListNodeOfListOfMeshGroup;
48
49
50 #ifndef _Standard_HeaderFile
51 #include <Standard.hxx>
52 #endif
53 #ifndef _Standard_Macro_HeaderFile
54 #include <Standard_Macro.hxx>
55 #endif
56
57 class SMDS_ListOfMeshGroup  {
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 SMDS_ListOfMeshGroup();
80 Standard_EXPORT   void Assign(const SMDS_ListOfMeshGroup& Other) ;
81   void operator=(const SMDS_ListOfMeshGroup& Other) 
82 {
83   Assign(Other);
84 }
85
86 Standard_EXPORT   Standard_Integer Extent() const;
87 Standard_EXPORT   void Clear() ;
88 ~SMDS_ListOfMeshGroup()
89 {
90   Clear();
91 }
92
93 Standard_EXPORT inline   Standard_Boolean IsEmpty() const;
94 Standard_EXPORT   void Prepend(const Handle(SMDS_MeshGroup)& I) ;
95 Standard_EXPORT   void Prepend(SMDS_ListOfMeshGroup& Other) ;
96 Standard_EXPORT   void Append(const Handle(SMDS_MeshGroup)& I) ;
97 Standard_EXPORT   void Append(SMDS_ListOfMeshGroup& Other) ;
98 Standard_EXPORT   Handle_SMDS_MeshGroup& First() const;
99 Standard_EXPORT   Handle_SMDS_MeshGroup& Last() const;
100 Standard_EXPORT   void RemoveFirst() ;
101 Standard_EXPORT   void Remove(SMDS_ListIteratorOfListOfMeshGroup& It) ;
102 Standard_EXPORT   void InsertBefore(const Handle(SMDS_MeshGroup)& I,SMDS_ListIteratorOfListOfMeshGroup& It) ;
103 Standard_EXPORT   void InsertBefore(SMDS_ListOfMeshGroup& Other,SMDS_ListIteratorOfListOfMeshGroup& It) ;
104 Standard_EXPORT   void InsertAfter(const Handle(SMDS_MeshGroup)& I,SMDS_ListIteratorOfListOfMeshGroup& It) ;
105 Standard_EXPORT   void InsertAfter(SMDS_ListOfMeshGroup& Other,SMDS_ListIteratorOfListOfMeshGroup& It) ;
106
107
108 friend class SMDS_ListIteratorOfListOfMeshGroup;
109
110
111
112 protected:
113
114  // Methods PROTECTED
115  // 
116
117
118  // Fields PROTECTED
119  //
120
121
122 private: 
123
124  // Methods PRIVATE
125  // 
126 Standard_EXPORT SMDS_ListOfMeshGroup(const SMDS_ListOfMeshGroup& Other);
127
128
129  // Fields PRIVATE
130  //
131 Standard_Address myFirst;
132 Standard_Address myLast;
133
134
135 };
136
137 #define Item Handle_SMDS_MeshGroup
138 #define Item_hxx "SMDS_MeshGroup.hxx"
139 #define TCollection_ListNode SMDS_ListNodeOfListOfMeshGroup
140 #define TCollection_ListNode_hxx "SMDS_ListNodeOfListOfMeshGroup.hxx"
141 #define TCollection_ListIterator SMDS_ListIteratorOfListOfMeshGroup
142 #define TCollection_ListIterator_hxx "SMDS_ListIteratorOfListOfMeshGroup.hxx"
143 #define Handle_TCollection_ListNode Handle_SMDS_ListNodeOfListOfMeshGroup
144 #define TCollection_ListNode_Type_() SMDS_ListNodeOfListOfMeshGroup_Type_()
145 #define TCollection_List SMDS_ListOfMeshGroup
146 #define TCollection_List_hxx "SMDS_ListOfMeshGroup.hxx"
147
148 #include <TCollection_List.lxx>
149
150 #undef Item
151 #undef Item_hxx
152 #undef TCollection_ListNode
153 #undef TCollection_ListNode_hxx
154 #undef TCollection_ListIterator
155 #undef TCollection_ListIterator_hxx
156 #undef Handle_TCollection_ListNode
157 #undef TCollection_ListNode_Type_
158 #undef TCollection_List
159 #undef TCollection_List_hxx
160
161
162 // other inline functions and methods (like "C++: function call" methods)
163 //
164
165
166 #endif