1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _NMTTools_ListOfCommonBlock_HeaderFile
21 #define _NMTTools_ListOfCommonBlock_HeaderFile
23 #ifndef _Standard_Address_HeaderFile
24 #include <Standard_Address.hxx>
26 #ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
27 #include <Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx>
29 #ifndef _Standard_Integer_HeaderFile
30 #include <Standard_Integer.hxx>
32 #ifndef _Standard_Boolean_HeaderFile
33 #include <Standard_Boolean.hxx>
35 class Standard_NoSuchObject;
36 class NMTTools_ListIteratorOfListOfCommonBlock;
37 class NMTTools_CommonBlock;
38 class NMTTools_ListNodeOfListOfCommonBlock;
41 #ifndef _Standard_HeaderFile
42 #include <Standard.hxx>
44 #ifndef _Standard_Macro_HeaderFile
45 #include <Standard_Macro.hxx>
48 class NMTTools_ListOfCommonBlock {
52 void* operator new(size_t,void* anAddress)
56 void* operator new(size_t size)
58 return Standard::Allocate(size);
60 void operator delete(void *anAddress)
62 if (anAddress) Standard::Free((Standard_Address&)anAddress);
66 Standard_EXPORT NMTTools_ListOfCommonBlock();
67 Standard_EXPORT void Assign(const NMTTools_ListOfCommonBlock& Other) ;
68 void operator=(const NMTTools_ListOfCommonBlock& Other)
73 Standard_EXPORT Standard_Integer Extent() const;
74 Standard_EXPORT void Clear() ;
75 ~NMTTools_ListOfCommonBlock()
80 Standard_Boolean IsEmpty() const;
81 Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I) ;
82 Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ;
83 Standard_EXPORT void Prepend(NMTTools_ListOfCommonBlock& Other) ;
84 Standard_EXPORT void Append(const NMTTools_CommonBlock& I) ;
85 Standard_EXPORT void Append(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ;
86 Standard_EXPORT void Append(NMTTools_ListOfCommonBlock& Other) ;
87 Standard_EXPORT NMTTools_CommonBlock& First() const;
88 Standard_EXPORT NMTTools_CommonBlock& Last() const;
89 Standard_EXPORT void RemoveFirst() ;
90 Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCommonBlock& It) ;
91 Standard_EXPORT void InsertBefore(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
92 Standard_EXPORT void InsertBefore(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
93 Standard_EXPORT void InsertAfter(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
94 Standard_EXPORT void InsertAfter(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
97 friend class NMTTools_ListIteratorOfListOfCommonBlock;
115 Standard_EXPORT NMTTools_ListOfCommonBlock(const NMTTools_ListOfCommonBlock& Other);
120 Standard_Address myFirst;
121 Standard_Address myLast;
126 #define Item NMTTools_CommonBlock
127 #define Item_hxx <NMTTools_CommonBlock.hxx>
128 #define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
129 #define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCommonBlock.hxx>
130 #define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock
131 #define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
132 #define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock
133 #define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_()
134 #define TCollection_List NMTTools_ListOfCommonBlock
135 #define TCollection_List_hxx <NMTTools_ListOfCommonBlock.hxx>
137 #include <TCollection_List.lxx>
141 #undef TCollection_ListNode
142 #undef TCollection_ListNode_hxx
143 #undef TCollection_ListIterator
144 #undef TCollection_ListIterator_hxx
145 #undef Handle_TCollection_ListNode
146 #undef TCollection_ListNode_Type_
147 #undef TCollection_List
148 #undef TCollection_List_hxx
151 // other Inline functions and methods (like "C++: function call" methods)