//
//  ZNMutable2DArray.h
//  Znarhg
//
//  Created by Julian Vrieslander on 1/20/05.
//  Copyright 2005 University of Washington. All rights reserved.
//
//	This is a category that extends the NSMutableArray class to a two dimensional array.

#import <Cocoa/Cocoa.h>


@interface NSMutableArray (ZNMutable2DArray)

+ (NSMutableArray *)arrayWithRows:(short)rowCount andColumns:(short)colCount;

// The following accessors do not perform bounds checking.  If an index is beyond the dimensions of the array, an exception will be thrown.  The code that created the 2D array is responsible for remembering the dimensions.  That is because this module is a protocol - it can add methods, but not ivars to the NSMutableArray class.
- (id)objectAtRowIndex:(short)rowIndex columnIndex:(short)colIndex;
- (void)setObject:(id)obj atRowIndex:(short)rowIndex columnIndex:(short)colIndex;
- (int)intAtRowIndex:(short)rowIndex columnIndex:(short)colIndex;
- (void)setInt:(int)value atRowIndex:(short)rowIndex columnIndex:(short)colIndex;
- (float)floatAtRowIndex:(short)rowIndex columnIndex:(short)colIndex;
- (void)setFloat:(float)value atRowIndex:(short)rowIndex columnIndex:(short)colIndex;
- (double)doubleAtRowIndex:(short)rowIndex columnIndex:(short)colIndex;
- (void)setDouble:(double)value atRowIndex:(short)rowIndex columnIndex:(short)colIndex;


@end
