smack merge from tizen_2.1_smack
[external/ragel.git] / aapl / dlist.h
1 /*
2  *  Copyright 2001 Adrian Thurston <thurston@complang.org>
3  */
4
5 /*  This file is part of Aapl.
6  *
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)
10  *  any later version.
11  *
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
15  *  more details.
16  *
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
20  */
21
22 #ifndef _AAPL_DLIST_H
23 #define _AAPL_DLIST_H
24
25 #define BASE_EL(name) name
26 #define DLMEL_TEMPDEF class Element
27 #define DLMEL_TEMPUSE Element
28 #define DList DList
29
30 /**
31  * \addtogroup dlist
32  * @{
33  */
34
35 /**
36  * \class DList
37  * \brief Basic doubly linked list.
38  *
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.
44  *
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.
50  *
51  * \include ex_dlist.cpp
52  */
53
54 /*@}*/
55
56 #include "dlcommon.h"
57
58 #undef BASE_EL
59 #undef DLMEL_TEMPDEF
60 #undef DLMEL_TEMPUSE
61 #undef DList
62
63 #endif /* _AAPL_DLIST_H */
64