ObjFW
Loading...
Searching...
No Matches
OFSortedList.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This file is part of ObjFW. It may be distributed under the terms of the
7 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8 * the packaging of this file.
9 *
10 * Alternatively, it may be distributed under the terms of the GNU General
11 * Public License, either version 2 or 3, which can be found in the file
12 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13 * file.
14 */
15
16#import "OFList.h"
17
18OF_ASSUME_NONNULL_BEGIN
19
28@interface OFSortedList OF_GENERIC(ObjectType): OFList OF_GENERIC(ObjectType)
29#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
30# define ObjectType id
31#endif
32{
33 OF_RESERVE_IVARS(OFSortedList, 4)
34}
35
36- (OFListItem)appendObject: (ObjectType)object OF_UNAVAILABLE;
37- (OFListItem)prependObject: (ObjectType)object OF_UNAVAILABLE;
38- (OFListItem)insertObject: (ObjectType)object
39 beforeListItem: (OFListItem)listItem OF_UNAVAILABLE;
40- (OFListItem)insertObject: (ObjectType)object
41 afterListItem: (OFListItem)listItem OF_UNAVAILABLE;
42
49- (OFListItem)insertObject: (ObjectType <OFComparing>)object;
50#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
51# undef ObjectType
52#endif
53@end
54
55OF_ASSUME_NONNULL_END
A class which provides easy to use double-linked lists.
Definition OFList.h:91
A class which provides easy to use sorted double-linked lists.
Definition OFSortedList.h:32
A list item.