1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef _NMTTools_ListOfCommonBlock_HeaderFile
23 #define _NMTTools_ListOfCommonBlock_HeaderFile
25 #ifndef _Standard_Address_HeaderFile
26 #include <Standard_Address.hxx>
28 #ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
29 #include <Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx>
31 #ifndef _Standard_Integer_HeaderFile
32 #include <Standard_Integer.hxx>
34 #ifndef _Standard_Boolean_HeaderFile
35 #include <Standard_Boolean.hxx>
37 class Standard_NoSuchObject;
38 class NMTTools_ListIteratorOfListOfCommonBlock;
39 class NMTTools_CommonBlock;
40 class NMTTools_ListNodeOfListOfCommonBlock;
43 #ifndef _Standard_HeaderFile
44 #include <Standard.hxx>
46 #ifndef _Standard_Macro_HeaderFile
47 #include <Standard_Macro.hxx>
51 class NMTTools_ListOfCommonBlock {
55 void* operator new(size_t,void* anAddress)
59 void* operator new(size_t size)
61 return Standard::Allocate(size);
63 void operator delete(void *anAddress)
65 if (anAddress) Standard::Free((Standard_Address&)anAddress);
71 Standard_EXPORT NMTTools_ListOfCommonBlock();
74 Standard_EXPORT void Assign(const NMTTools_ListOfCommonBlock& Other) ;
75 void operator=(const NMTTools_ListOfCommonBlock& Other)
82 Standard_EXPORT Standard_Integer Extent() const;
85 Standard_EXPORT void Clear() ;
86 ~NMTTools_ListOfCommonBlock()
92 Standard_Boolean IsEmpty() const;
95 Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I) ;
98 Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ;
101 Standard_EXPORT void Prepend(NMTTools_ListOfCommonBlock& Other) ;
104 Standard_EXPORT void Append(const NMTTools_CommonBlock& I) ;
107 Standard_EXPORT void Append(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ;
110 Standard_EXPORT void Append(NMTTools_ListOfCommonBlock& Other) ;
113 Standard_EXPORT NMTTools_CommonBlock& First() const;
116 Standard_EXPORT NMTTools_CommonBlock& Last() const;
119 Standard_EXPORT void RemoveFirst() ;
122 Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCommonBlock& It) ;
125 Standard_EXPORT void InsertBefore(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
128 Standard_EXPORT void InsertBefore(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
131 Standard_EXPORT void InsertAfter(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
134 Standard_EXPORT void InsertAfter(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
137 friend class NMTTools_ListIteratorOfListOfCommonBlock;
157 Standard_EXPORT NMTTools_ListOfCommonBlock(const NMTTools_ListOfCommonBlock& Other);
162 Standard_Address myFirst;
163 Standard_Address myLast;
168 #define Item NMTTools_CommonBlock
169 #define Item_hxx <NMTTools_CommonBlock.hxx>
170 #define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
171 #define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCommonBlock.hxx>
172 #define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock
173 #define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
174 #define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock
175 #define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_()
176 #define TCollection_List NMTTools_ListOfCommonBlock
177 #define TCollection_List_hxx <NMTTools_ListOfCommonBlock.hxx>
179 #include <TCollection_List.lxx>
183 #undef TCollection_ListNode
184 #undef TCollection_ListNode_hxx
185 #undef TCollection_ListIterator
186 #undef TCollection_ListIterator_hxx
187 #undef Handle_TCollection_ListNode
188 #undef TCollection_ListNode_Type_
189 #undef TCollection_List
190 #undef TCollection_List_hxx
193 // other Inline functions and methods (like "C++: function call" methods)