ObjFW  Diff

Differences From Artifact [c3f8c7f7f4]:

To Artifact [0a2f130382]:


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

/**
 * \brief 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 count;
	size_t itemSize;
}

#ifdef OF_HAVE_PROPERTIES







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

/**
 * \brief 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, OFComparing>
{
	char   *data;
	size_t count;
	size_t itemSize;
}

#ifdef OF_HAVE_PROPERTIES
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
- (size_t)itemSize;

/**
 * \return All elements of the OFDataArray as a C array
 */
- (void*)cArray;

/**
 * Compares the OFDataArray to another object.
 *
 * \param ary A data array to compare with
 * \return An of_comparsion_result_t
 */
- (of_comparison_result_t)compare: (OFDataArray*)ary;

/**
 * Returns a specific item of the OFDataArray.
 *
 * \param index The number of the item to return
 * \return The specified item of the OFDataArray
 */
- (void*)itemAtIndex: (size_t)index;







<
<
<
<
<
<
<
<







77
78
79
80
81
82
83








84
85
86
87
88
89
90
- (size_t)itemSize;

/**
 * \return All elements of the OFDataArray as a C array
 */
- (void*)cArray;









/**
 * Returns a specific item of the OFDataArray.
 *
 * \param index The number of the item to return
 * \return The specified item of the OFDataArray
 */
- (void*)itemAtIndex: (size_t)index;