ObjFW  Diff

Differences From Artifact [246ee00df8]:

To Artifact [1389a09656]:


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
typedef id (^of_array_replace_block_t)(id obj, size_t idx, BOOL *stop);
#endif

/**
 * \brief A class for storing, adding and removing objects in an array.
 */
@interface OFMutableArray: OFArray
{
	unsigned long mutations;
}

/**
 * \brief Adds an object to the OFArray.
 *
 * \param object An object to add
 */
- (void)addObject: (id)object;








<
<
<
<







20
21
22
23
24
25
26




27
28
29
30
31
32
33
typedef id (^of_array_replace_block_t)(id obj, size_t idx, BOOL *stop);
#endif

/**
 * \brief A class for storing, adding and removing objects in an array.
 */
@interface OFMutableArray: OFArray




/**
 * \brief Adds an object to the OFArray.
 *
 * \param object An object to add
 */
- (void)addObject: (id)object;

99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126





127



 * \brief Removes the specified amount of objects from the end of the OFArray.
 *
 * \param nObjects The number of objects to remove
 */
- (void)removeNObjects: (size_t)nObjects;

/**
 * \brief Removes the specified amount of objects at the specified index.
 *
 * \param nobjects The number of objects to remove
 * \param index The index at which the objects are removed
 */
- (void)removeNObjects: (size_t)nObjects
	       atIndex: (size_t)index;

/**
 * \brief Removes the last object.
 */
- (void)removeLastObject;

#ifdef OF_HAVE_BLOCKS
/**
 * \brief Replaces each object with the object returned by the block.
 *
 * \param block The block which returns a new object for each object
 */
- (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block;
#endif





@end










|

|
<

|
<














>
>
>
>
>

>
>
>
95
96
97
98
99
100
101
102
103
104

105
106

107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
 * \brief Removes the specified amount of objects from the end of the OFArray.
 *
 * \param nObjects The number of objects to remove
 */
- (void)removeNObjects: (size_t)nObjects;

/**
 * \brief Removes the object in the specified range.
 *
 * \param range The range of the objects to remove

 */
- (void)removeObjectsInRange: (of_range_t)range;


/**
 * \brief Removes the last object.
 */
- (void)removeLastObject;

#ifdef OF_HAVE_BLOCKS
/**
 * \brief Replaces each object with the object returned by the block.
 *
 * \param block The block which returns a new object for each object
 */
- (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block;
#endif

/**
 * \brief Converts the mutable array to an immutable array.
 */
- (OFArray*)makeImmutable;
@end

@interface OFMutableArrayPlaceholder: OFMutableArray
@end