2010-09-21 21:46:13 +00:00
|
|
|
//
|
2010-11-30 23:26:03 +00:00
|
|
|
// XniAdaptiveArray.h
|
2010-09-21 21:46:13 +00:00
|
|
|
// XNI
|
|
|
|
//
|
|
|
|
// Created by Matej Jan on 21.9.10.
|
|
|
|
// Copyright 2010 Retronator. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
|
2010-11-30 23:26:03 +00:00
|
|
|
@interface XniAdaptiveArray : NSObject {
|
2010-09-21 21:46:13 +00:00
|
|
|
int capacity;
|
|
|
|
int itemSize;
|
|
|
|
void *array;
|
|
|
|
int count;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (id) initWithItemSize:(int)theItemSize initialCapacity:(int)theCapacity;
|
2012-05-14 08:40:49 +00:00
|
|
|
- (id) initWithArray:(XniAdaptiveArray*)source;
|
2010-09-21 21:46:13 +00:00
|
|
|
|
|
|
|
@property (nonatomic, readonly) int itemSize;
|
|
|
|
@property (nonatomic, readonly) void *array;
|
|
|
|
@property (nonatomic, readonly) int count;
|
|
|
|
|
|
|
|
- (void) addItem:(void*)item;
|
|
|
|
- (void) clear;
|
2012-05-14 08:40:49 +00:00
|
|
|
- (void*) removeLastItem;
|
2010-09-21 21:46:13 +00:00
|
|
|
|
|
|
|
@end
|