1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* Copyright (c) 2008 - 2010
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of ObjFW. 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 "OFArray.h"
/**
* \brief A class for storing, adding and removing objects in an array.
*/
@interface OFMutableArray: OFArray
{
unsigned long mutations;
}
|
>
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* Copyright (c) 2008 - 2010
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of ObjFW. 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 "OFArray.h"
#ifdef OF_HAVE_BLOCKS
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;
}
|
98
99
100
101
102
103
104
105
|
* 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;
@end
|
>
>
>
>
>
>
>
>
>
|
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
* 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;
#ifdef OF_HAVE_BLOCKS
/**
* 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
|