1/* Inline Functions for keyword-list.{h,cc}.
2
3 Copyright (C) 2002-2003 Free Software Foundation, Inc.
4 Written by Bruno Haible <bruno@clisp.org>.
5
6 This file is part of GNU GPERF.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21/* -------------------------- Keyword_List class --------------------------- */
22
23/* Access to first element of list. */
24INLINE Keyword *
25Keyword_List::first () const
26{
27 return _car;
28}
29
30/* Access to next element of list. */
31INLINE Keyword_List *&
32Keyword_List::rest ()
33{
34 return _cdr;
35}
36
37/* ------------------------- KeywordExt_List class ------------------------- */
38
39/* Access to first element of list. */
40INLINE KeywordExt *
41KeywordExt_List::first () const
42{
43 return static_cast<KeywordExt*>(_car);
44}
45
46/* Access to next element of list. */
47INLINE KeywordExt_List *&
48KeywordExt_List::rest ()
49{
50 return *reinterpret_cast<KeywordExt_List**>(&_cdr);
51}
52