ObjFW  Diff

Differences From Artifact [71b17c2d3e]:

To Artifact [304e257df3]:


8
9
10
11
12
13
14



15
16
17
18
19
20
21




22




23




24




25






26






27
28
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFObject.h"
#import "OFListObject.h"




@interface OFList: OFObject
{
	OFListObject *first;
	OFListObject *last;
}

- init;




- free;




- freeIncludingData;




- (OFListObject*)first;




- (OFListObject*)last;






- add: (OFListObject*)ptr;






- addNew: (void*)ptr;
@end







>
>
>







>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>
>
>
|
>
>
>
>
>
>


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFObject.h"
#import "OFListObject.h"

/**
 * The OFList class provides easy to use double-linked lists.
 */
@interface OFList: OFObject
{
	OFListObject *first;
	OFListObject *last;
}

- init;

/**
 * Frees the OFList and all OFListObjects, but not the data they contian.
 */
- free;

/**
 * Frees the list and the data included in all OFListObjects it contains.
 */
- freeIncludingData;

/**
 * \returns The first OFListObject in the OFList
 */
- (OFListObject*)first;

/**
 * \returns The last OFListObject in the OFList
 */
- (OFListObject*)last;

/**
 * Adds a new OFListObject to the OFList.
 *
 * \param obj An OFListObject
 */
- add: (OFListObject*)obj;

/**
 * Creates a new OFListObject and adds it to the OFList.
 *
 * \param ptr Pointer to the data for the OFListObject which will be added
 */
- addNew: (void*)ptr;
@end