3 * (c) 2011 Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
10 * As a special exception, you may use this file as part of a free software
11 * library without restriction. Specifically, if other files instantiate
12 * templates or use macros or inline functions from this file, or you compile
13 * this file and link it with other files to produce an executable, this
14 * file does not by itself cause the resulting executable to be covered by
15 * the GNU General Public License. This exception does not however
16 * invalidate any other reasons why the executable file might be covered by
17 * the GNU General Public License.
24 template< typename T > class H_list;
26 template< typename T >
30 friend class H_list<T>;
32 H_list_item *_n, **_pn;
35 H_list_item() : _n(0), _pn(0) {}
37 T *l_next() const { return static_cast<T*>(_n); }
50 bool l_in_list() const { return _pn; }
52 ~H_list_item() { l_remove(); }
55 template< typename T >
66 T *first() const { return static_cast<T*>(_f); }
67 static T *next(T *c) { return c->l_next(); }