00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // SALOME SALOMEGUI : implementation of desktop and GUI kernel 00024 // File : SALOME_ListIO.hxx 00025 // Module : SALOME 00026 // 00027 #ifndef _SALOME_ListIO_HeaderFile 00028 #define _SALOME_ListIO_HeaderFile 00029 00030 #ifndef _Standard_Address_HeaderFile 00031 #include <Standard_Address.hxx> 00032 #endif 00033 #ifndef _Handle_SALOME_InteractiveObject_HeaderFile 00034 #include "Handle_SALOME_InteractiveObject.hxx" 00035 #endif 00036 #ifndef _Handle_SALOME_ListNodeOfListIO_HeaderFile 00037 #include "Handle_SALOME_ListNodeOfListIO.hxx" 00038 #endif 00039 #ifndef _Standard_Integer_HeaderFile 00040 #include <Standard_Integer.hxx> 00041 #endif 00042 #ifndef _Standard_Boolean_HeaderFile 00043 #include <Standard_Boolean.hxx> 00044 #endif 00045 class Standard_NoSuchObject; 00046 class SALOME_ListIteratorOfListIO; 00047 class SALOME_InteractiveObject; 00048 class SALOME_ListNodeOfListIO; 00049 00050 00051 #ifndef _Standard_HeaderFile 00052 #include <Standard.hxx> 00053 #endif 00054 #ifndef _Standard_Macro_HeaderFile 00055 #include <Standard_Macro.hxx> 00056 #endif 00057 00062 class SALOME_ListIO { 00063 00064 public: 00065 00066 void* operator new(size_t,void* anAddress) 00067 { 00068 return anAddress; 00069 } 00070 void* operator new(size_t size) 00071 { 00072 return Standard::Allocate(size); 00073 } 00074 void operator delete(void *anAddress) 00075 { 00076 if (anAddress) Standard::Free((Standard_Address&)anAddress); 00077 } 00078 // Methods PUBLIC 00079 // 00080 Standard_EXPORT SALOME_ListIO(); 00081 Standard_EXPORT void Assign(const SALOME_ListIO& Other) ; 00082 void operator=(const SALOME_ListIO& Other) 00083 { 00084 Assign(Other); 00085 } 00086 00087 Standard_EXPORT Standard_Integer Extent() const; 00088 Standard_EXPORT void Clear() ; 00089 ~SALOME_ListIO() 00090 { 00091 Clear(); 00092 } 00093 00094 Standard_EXPORT Standard_Boolean IsEmpty() const; 00095 Standard_EXPORT void Prepend(const Handle(SALOME_InteractiveObject)& I) ; 00096 Standard_EXPORT void Prepend(SALOME_ListIO& Other) ; 00097 Standard_EXPORT void Prepend(const Handle(SALOME_InteractiveObject)& I, SALOME_ListIteratorOfListIO& It) ; 00098 Standard_EXPORT void Append(const Handle(SALOME_InteractiveObject)& I) ; 00099 Standard_EXPORT void Append(SALOME_ListIO& Other) ; 00100 Standard_EXPORT void Append(const Handle(SALOME_InteractiveObject)& I, SALOME_ListIteratorOfListIO& It) ; 00101 Standard_EXPORT Handle_SALOME_InteractiveObject& First() const; 00102 Standard_EXPORT Handle_SALOME_InteractiveObject& Last() const; 00103 Standard_EXPORT void RemoveFirst() ; 00104 Standard_EXPORT void Remove(SALOME_ListIteratorOfListIO& It) ; 00105 Standard_EXPORT void InsertBefore(const Handle(SALOME_InteractiveObject)& I,SALOME_ListIteratorOfListIO& It) ; 00106 Standard_EXPORT void InsertBefore(SALOME_ListIO& Other,SALOME_ListIteratorOfListIO& It) ; 00107 Standard_EXPORT void InsertAfter(const Handle(SALOME_InteractiveObject)& I,SALOME_ListIteratorOfListIO& It) ; 00108 Standard_EXPORT void InsertAfter(SALOME_ListIO& Other,SALOME_ListIteratorOfListIO& It) ; 00109 00110 00111 friend class SALOME_ListIteratorOfListIO; 00112 00113 00114 00115 protected: 00116 00117 // Methods PROTECTED 00118 // 00119 00120 00121 // Fields PROTECTED 00122 // 00123 00124 00125 private: 00126 00127 // Methods PRIVATE 00128 // 00129 Standard_EXPORT SALOME_ListIO(const SALOME_ListIO& Other); 00130 00131 00132 // Fields PRIVATE 00133 // 00134 Standard_Address myFirst; 00135 Standard_Address myLast; 00136 00137 00138 }; 00139 00140 #define Item Handle_SALOME_InteractiveObject 00141 #define Item_hxx "SALOME_InteractiveObject.hxx" 00142 #define TCollection_ListNode SALOME_ListNodeOfListIO 00143 #define TCollection_ListNode_hxx "SALOME_ListNodeOfListIO.hxx" 00144 #define TCollection_ListIterator SALOME_ListIteratorOfListIO 00145 #define TCollection_ListIterator_hxx "SALOME_ListIteratorOfListIO.hxx" 00146 #define Handle_TCollection_ListNode Handle_SALOME_ListNodeOfListIO 00147 #define TCollection_ListNode_Type_() SALOME_ListNodeOfListIO_Type_() 00148 #define TCollection_List SALOME_ListIO 00149 #define TCollection_List_hxx "SALOME_ListIO.hxx" 00150 00151 #include <TCollection_List.lxx> 00152 00153 #undef Item 00154 #undef Item_hxx 00155 #undef TCollection_ListNode 00156 #undef TCollection_ListNode_hxx 00157 #undef TCollection_ListIterator 00158 #undef TCollection_ListIterator_hxx 00159 #undef Handle_TCollection_ListNode 00160 #undef TCollection_ListNode_Type_ 00161 #undef TCollection_List 00162 #undef TCollection_List_hxx 00163 00164 00165 // other Inline functions and methods (like "C++: function call" methods) 00166 // 00167 00168 00169 #endif