ObjFW
|
00001 /* 00002 * Copyright (c) 2008, 2009, 2010, 2011, 2012 00003 * Jonathan Schleifer <js@webkeks.org> 00004 * 00005 * All rights reserved. 00006 * 00007 * This file is part of ObjFW. It may be distributed under the terms of the 00008 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in 00009 * the packaging of this file. 00010 * 00011 * Alternatively, it may be distributed under the terms of the GNU General 00012 * Public License, either version 2 or 3, which can be found in the file 00013 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this 00014 * file. 00015 */ 00016 00017 #import "OFArray.h" 00018 00019 #ifdef OF_HAVE_BLOCKS 00020 typedef id (^of_array_replace_block_t)(id obj, size_t idx, BOOL *stop); 00021 #endif 00022 00027 @interface OFMutableArray: OFArray 00033 - (void)addObject: (id)object; 00034 00041 - (void)addObject: (id)object 00042 atIndex: (size_t)index; 00043 00051 - (void)replaceObject: (id)oldObject 00052 withObject: (id)newObject; 00053 00060 - (void)replaceObjectAtIndex: (size_t)index 00061 withObject: (id)object; 00062 00070 - (void)replaceObjectIdenticalTo: (id)oldObject 00071 withObject: (id)newObject; 00072 00078 - (void)removeObject: (id)object; 00079 00086 - (void)removeObjectIdenticalTo: (id)object; 00087 00093 - (void)removeObjectAtIndex: (size_t)index; 00094 00100 - (void)removeNObjects: (size_t)nObjects; 00101 00107 - (void)removeObjectsInRange: (of_range_t)range; 00108 00112 - (void)removeLastObject; 00113 00117 - (void)removeAllObjects; 00118 00119 #ifdef OF_HAVE_BLOCKS 00120 00125 - (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block; 00126 #endif 00127 00134 - (void)swapObjectAtIndex: (size_t)index1 00135 withObjectAtIndex: (size_t)index2; 00136 00140 - (void)sort; 00141 00145 - (void)reverse; 00146 00150 - (void)makeImmutable; 00151 @end