1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*
* Copyright (c) 2008
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of libobjfw. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE included in
* the packaging of this file.
*/
#import "OFObject.h"
@interface OFListObject: OFObject
{
void *data;
OFListObject *next;
OFListObject *prev;
}
+ newWithData: (void*)ptr;
- initWithData: (void*)ptr;
- freeIncludingData;
- (void*)data;
- (OFListObject*)next;
- (OFListObject*)prev;
- setNext: (OFListObject*)ptr;
- setPrev: (OFListObject*)ptr;
@end
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
|
|
1
2
3
4
5
6
7
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
60
61
62
63
64
65
66
67
68
69
70
71
|
/*
* Copyright (c) 2008
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of libobjfw. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE included in
* the packaging of this file.
*/
#import "OFObject.h"
/**
* The OFListObject class is a class for objects to be stored in an OFObject.
*/
@interface OFListObject: OFObject
{
void *data;
OFListObject *next;
OFListObject *prev;
}
/**
* \param The data the OFListObject should contain
* \return A new OFListObject.
*/
+ newWithData: (void*)ptr;
/**
* Initializes an already allocated OFListObjeect.
*
* \param The data the OFListObject should contain
* \return An initialized OFListObject.
*/
- initWithData: (void*)ptr;
/**
* Free the OFListObject and the data it contains.
*/
- freeIncludingData;
/**
* \return The data included in the OFListObject
*/
- (void*)data;
/**
* \return The next OFListObject in the OFList
*/
- (OFListObject*)next;
/**
* \return The previous OFListObject in the OFList
*/
- (OFListObject*)prev;
/**
* Sets the next OFListObject in the OFList.
*
* \param obj An OFListObject
*/
- setNext: (OFListObject*)obj;
/**
* Sets the previous OFListObject in the OFList.
*
* \param obj An OFListObject
*/
- setPrev: (OFListObject*)obj;
@end
|