1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
36 template<class LListBase, class T>
37 ILList<LListBase, T>::ILList(const ILList<LListBase, T>& slpl)
39 UILList<LListBase, T>()
43 typename UILList<LListBase, T>::const_iterator iter = slpl.begin();
48 append(iter().clone().ptr());
53 #ifndef __INTEL_COMPILER
54 template<class LListBase, class T>
55 template<class CloneArg>
56 ILList<LListBase, T>::ILList
58 const ILList<LListBase, T>& slpl,
59 const CloneArg& cloneArg
62 UILList<LListBase, T>()
66 typename UILList<LListBase, T>::const_iterator iter = slpl.begin();
71 append(iter().clone(cloneArg).ptr());
77 // * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
79 template<class LListBase, class T>
80 ILList<LListBase, T>::~ILList()
86 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
88 //- Return and remove head
89 template<class LListBase, class T>
90 bool ILList<LListBase, T>::eraseHead()
93 if ((tPtr = this->removeHead()))
104 //- Return and remove element
105 template<class LListBase, class T>
106 bool ILList<LListBase, T>::erase(T* p)
109 if ((tPtr = remove(p)))
121 template<class LListBase, class T>
122 void ILList<LListBase, T>::clear()
124 label oldSize = this->size();
125 for (label i=0; i<oldSize; i++)
134 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
136 template<class LListBase, class T>
137 void ILList<LListBase, T>::operator=(const ILList<LListBase, T>& slpl)
143 typename UILList<LListBase, T>::const_iterator iter = slpl.begin();
148 append(iter().clone().ptr());
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace Foam
157 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
159 #include "ILListIO.C"
162 // ************************************************************************* //