2 * Copyright 2001 Adrian Thurston <thurston@complang.org>
5 /* This file is part of Aapl.
7 * Aapl is free software; you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License as published by the Free
9 * Software Foundation; either version 2.1 of the License, or (at your option)
12 * Aapl is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
19 * Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #define BASE_EL(name) name
26 #define DLMEL_TEMPDEF class Element
27 #define DLMEL_TEMPUSE Element
37 * \brief Basic doubly linked list.
39 * DList is the standard by-structure list type. This class requires the
40 * programmer to declare a list element type that has the necessary next and
41 * previous pointers in it. This can be achieved by inheriting from the
42 * DListEl class or by simply adding next and previous pointers directly into
43 * the list element class.
45 * DList does not assume ownership of elements in the list. If the elements
46 * are known to reside on the heap, the provided empty() routine can be used to
47 * delete all elements, however the destructor will not call this routine, it
48 * will simply abandon all the elements. It is up to the programmer to
49 * explicitly de-allocate items when necessary.
51 * \include ex_dlist.cpp
63 #endif /* _AAPL_DLIST_H */