18 #import "OFCollection.h"
19 #import "OFEnumerator.h"
20 #import "OFSerialization.h"
22 OF_ASSUME_NONNULL_BEGIN
47 #ifdef OF_HAVE_GENERICS
48 @interface OFList <ObjectType>:
51 # define ObjectType id
60 unsigned long _mutations;
63 #ifdef OF_HAVE_PROPERTIES
149 - (bool)containsObject: (nullable ObjectType)object;
158 - (bool)containsObjectIdenticalTo: (nullable ObjectType)object;
192 #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
200 unsigned long _mutations;
201 unsigned long *_mutationsPtr;
205 mutationsPointer: (
unsigned long*)mutationsPtr;
208 OF_ASSUME_NONNULL_END
A protocol for serializing objects.
Definition: OFSerialization.h:30
nullable ObjectType firstObject()
Returns the first object of the list or nil.
Definition: OFList.m:200
OFEnumerator OF_GENERIC(ObjectType objectEnumerator()
Returns an OFEnumerator to enumerate through all objects of the list.
Definition: OFList.m:412
nullable of_list_object_t * lastListObject()
Returns the last list object of the list.
Definition: OFList.m:83
The root class for all other classes inside ObjFW.
Definition: OFObject.h:364
void removeAllObjects()
Removes all objects from the list.
Definition: OFList.m:268
A protocol with methods common for all collections.
Definition: OFCollection.h:26
of_list_object_t * previous
A pointer to the previous list object in the list.
Definition: OFList.h:37
nullable of_list_object_t * firstListObject()
Returns the first list object of the list.
Definition: OFList.m:78
A list object.
Definition: OFList.h:33
A class which provides easy to use double-linked lists.
Definition: OFList.h:53
A protocol for the creation of copies.
Definition: OFObject.h:896
nullable ObjectType lastObject()
Returns the last object of the list or nil.
Definition: OFList.m:205
instancetype list()
Creates a new OFList.
Definition: OFList.m:31
of_list_object_t * next
A pointer to the next list object in the list.
Definition: OFList.h:35
A class which provides methods to enumerate through collections.
Definition: OFEnumerator.h:52
id __unsafe_unretained object
The object for the list object.
Definition: OFList.h:39