14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/**
* The OFDataArray class provides a class for storing arbitrary data in an
* array.
*
* If you plan to store large hunks of data, you should consider using
* OFBigDataArray, which allocates the memory in pages rather than in bytes.
*/
@interface OFDataArray: OFObject
{
char *data;
size_t itemsize;
size_t count;
}
/**
|
|
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/**
* The OFDataArray class provides a class for storing arbitrary data in an
* array.
*
* If you plan to store large hunks of data, you should consider using
* OFBigDataArray, which allocates the memory in pages rather than in bytes.
*/
@interface OFDataArray: OFObject <OFCopying>
{
char *data;
size_t itemsize;
size_t count;
}
/**
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
- (size_t)itemsize;
/**
* \return All elements of the OFDataArray
*/
- (void*)data;
/**
* Clones the OFDataArray, creating a new one.
*
* \return A new autoreleased copy of the OFDataArray
*/
- (id)copy;
/**
* Compares the OFDataArray to another object.
*
* \param obj An object to compare with
* \return An integer which is the result of the comparison, see for example
* strcmp
*/
|
<
<
<
<
<
<
<
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
- (size_t)itemsize;
/**
* \return All elements of the OFDataArray
*/
- (void*)data;
/**
* Compares the OFDataArray to another object.
*
* \param obj An object to compare with
* \return An integer which is the result of the comparison, see for example
* strcmp
*/
|
115
116
117
118
119
120
121
122
123
124
125
126
|
* Removes the specified amount of items from the end of the OFDataArray.
*
* \param nitems The number of items to remove
*/
- removeNItems: (size_t)nitems;
@end
@interface OFBigDataArray: OFDataArray
{
size_t size;
}
@end
|
|
|
108
109
110
111
112
113
114
115
116
117
118
119
|
* Removes the specified amount of items from the end of the OFDataArray.
*
* \param nitems The number of items to remove
*/
- removeNItems: (size_t)nitems;
@end
@interface OFBigDataArray: OFDataArray <OFCopying>
{
size_t size;
}
@end
|