ftp.nice.ch/pub/next/developer/objc/EOF/OTC_EOFBetaExamples.1.0.bs.tar.gz#/OTC_EOFBetaExamples_V1.0/NSFoundation/ClassCluster/RealMutableArray.h

This is RealMutableArray.h in view mode; [Download] [Up]

/*--------------------------------------------------------------------------
 *
 * 	You may freely copy, distribute, and reuse the code in this example.
 * 	SHL Systemhouse disclaims any warranty of any kind, expressed or  
 *	implied, as to its fitness for any particular use.
 *
 *
 *	RealMutableArray
 *
 *	Inherits From:		NSMutableArray
 *
 *	Conforms To:		NSCopying, NSMutableCopying, NSCoding
 *
 *	Declared In:		RealMutableArray.h
 *
 *	Class Description
 *
 *		This array provides the standard computer science style array.  
 *		When an object is inserted at position n, it stays in position n
 *		even if there are empty slots at lower indices.
 *
 *		This subclass is created using the "Composite Object" scenario 
 *		described in NeXT's documentation on the Foundation Kit in the section
 *		on Class Clusters.
 *
 *
 *------------------------------------------------------------------------*/
#import <foundation/foundation.h>




@interface RealMutableArray : NSMutableArray
{
	NSMutableArray	*array;
	unsigned		count;
	unsigned		capacity;
}

/*--------------------------------------------------------------------------
 *	Allocing, initing, and deallocing
 *------------------------------------------------------------------------*/
+ array;
+ arrayWithCapacity: (unsigned)aNumItems;
- initWithCapacity:(unsigned)aNumItems;

/*--------------------------------------------------------------------------
 *	Mutable array primitives
 *------------------------------------------------------------------------*/
- (void)addObject:object;
- (void)replaceObjectAtIndex:(unsigned)index withObject:object;
- (void)removeLastObject;
- (void)insertObject:object atIndex:(unsigned)index;
- (void)removeObjectAtIndex:(unsigned)index;


@end



@interface Null : NSObject
{
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.