2 /* Copyright (C) 2003 TSUTSUMI Kikuo.
3 This file is part of the CCUnit Library.
5 The CCUnit Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License
7 as published by the Free Software Foundation; either version 2.1 of
8 the License, or (at your option) any later version.
10 The CCUnit Library is distributed in the hope that it will be
11 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the CCUnit Library; see the file COPYING.LESSER.
17 If not, write to the Free Software Foundation, Inc., 59 Temple
18 Place - Suite 330, Boston, MA 02111-1307, USA.
32 #include <ccunit/CCUnitConfig.h>
39 typedef struct CCUnitList
41 struct CCUnitListCell* head;
42 struct CCUnitListCell** tailp;
47 typedef struct CCUnitListIterator
49 struct CCUnitListCell* current;
53 extern inline CCUnitList* ccunit_newList ();
54 extern void ccunit_addList (CCUnitList* list, void* contents);
55 extern CCUnitList* ccunit_initList (CCUnitList* list);
56 extern void ccunit_deleteList (CCUnitList* list, void (*deleteContents)(void*));
58 extern CCUnitListIterator* ccunit_newListIterator (const struct CCUnitList* list);
60 CCUnitListIterator* ccunit_initListIterator (const struct CCUnitList* list,
61 struct CCUnitListIterator* it);
62 extern inline void ccunit_deleteListIterator (struct CCUnitListIterator* it);
63 extern void* ccunit_nextListIterator (struct CCUnitListIterator* it);
64 extern bool ccunit_hasNextListIterator (struct CCUnitListIterator* it);