1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00
XNI/Classes/System/ReadOnlyCollection.m.h
Matej Jan d5b2897d8b Added 3D Model support.
git-svn-id: http://xni.googlecode.com/svn/XNI@42 ac433895-eea3-a490-d80a-17149a75e588
2010-11-30 23:26:03 +00:00

47 lines
887 B
Objective-C

//
// ReadOnlyCollection.m
// XNI
//
// Created by Matej Jan on 29.11.10.
// Copyright 2010 Retronator. All rights reserved.
//
// #define ReadOnlyCollection ReadOnlyCollectionName
// #define T DataType
@implementation ReadOnlyCollection
- (id) initWithItems:(NSArray*)items
{
self = [super init];
if (self != nil) {
collection = [[NSMutableArray alloc] initWithArray:items];
#ifdef Initialization
Initialization
#endif
}
return self;
}
- (int) count {
return [collection count];
}
- (T)itemAt:(int)index {
return [collection objectAtIndex:index];
}
- (NSUInteger) countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len {
return [collection countByEnumeratingWithState:state objects:stackbuf count:len];
}
- (void) dealloc
{
[collection dealloc];
[super dealloc];
}
@end
// #undef ReadOnlyCollection
// #undef T