ObjFW
 All Classes Functions Variables
OFMutableArray.h
1 /*
2  * Copyright (c) 2008, 2009, 2010, 2011, 2012
3  * Jonathan Schleifer <js@webkeks.org>
4  *
5  * All rights reserved.
6  *
7  * This file is part of ObjFW. It may be distributed under the terms of the
8  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
9  * the packaging of this file.
10  *
11  * Alternatively, it may be distributed under the terms of the GNU General
12  * Public License, either version 2 or 3, which can be found in the file
13  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
14  * file.
15  */
16 
17 #import "OFArray.h"
18 
19 #ifdef OF_HAVE_BLOCKS
20 typedef id (^of_array_replace_block_t)(id obj, size_t idx, BOOL *stop);
21 #endif
22 
33 - (void)addObject: (id)object;
34 
40 - (void)addObjectsFromArray: (OFArray*)array;
41 
48 - (void)insertObject: (id)object
49  atIndex: (size_t)index;
50 
57 - (void)insertObjectsFromArray: (OFArray*)array
58  atIndex: (size_t)index;
59 
67 - (void)replaceObject: (id)oldObject
68  withObject: (id)newObject;
69 
76 - (void)replaceObjectAtIndex: (size_t)index
77  withObject: (id)object;
78 - (void)setObject: (id)object
79  atIndexedSubscript: (size_t)index;
80 
88 - (void)replaceObjectIdenticalTo: (id)oldObject
89  withObject: (id)newObject;
90 
96 - (void)removeObject: (id)object;
97 
104 - (void)removeObjectIdenticalTo: (id)object;
105 
111 - (void)removeObjectAtIndex: (size_t)index;
112 
118 - (void)removeObjectsInRange: (of_range_t)range;
119 
123 - (void)removeLastObject;
124 
128 - (void)removeAllObjects;
129 
130 #ifdef OF_HAVE_BLOCKS
131 
136 - (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block;
137 #endif
138 
145 - (void)exchangeObjectAtIndex: (size_t)index1
146  withObjectAtIndex: (size_t)index2;
147 
151 - (void)sort;
152 
156 - (void)reverse;
157 
161 - (void)makeImmutable;
162 @end