#import <CC3DataArray.h>
Instance Methods | |
(void *) | - elementAt: |
(void) | - ensureElementCapacity: |
(id) | - initWithElementSize: |
Class Methods | |
(id) | + dataArrayWithElementSize: |
Properties | |
NSUInteger | elementCapacity |
NSUInteger | elementSize |
BOOL | isReady |
CC3DataArray manages data as an array of structure elements.
+ (id) dataArrayWithElementSize: | (NSUInteger) | elementSize |
Allocates and initializes an autoreleased instance to hold an array of data elements, where each element will be of the specified size in bytes.
The initial element capacity is zero. This can be extended via the elementCapacity property.
- (void*) elementAt: | (NSUInteger) | index |
Returns a pointer to the element in this array at the specified index.
The returned pointer will typically be cast to a structure whose size matches the elementSize property.
- (void) ensureElementCapacity: | (NSUInteger) | elementCapacity |
Ensures that this data array can hold at least the specified number of elements, each of the size indicated by the elementSize property.
If the specified element capacity is larger than the value returned by the elementCapacity property, the data array is expanded to the new capacity. if the specified element capacity is equal to or smaller than the value returned by teh elementCapacity property, no changes are made to the capacity of this data array.
Changing this property may change the value of the length property.
- (id) initWithElementSize: | (NSUInteger) | elementSize |
Initializes this instance to hold an array of data elements, where each element will be of the specified size in bytes.
The initial element capacity is zero. This can be extended via the elementCapacity property.
|
readwritenonatomicassign |
Indicates the number of elements, each of the size indicated by the elementSize property, that can be held in this data array.
Changing this property changes the value of the length property.
The initial value of this property is zero.
|
readwritenonatomicassign |
Indicates the size, in bytes, of each data element in this array.
In common use, an instance will contain an array of structs, and this value will indicate the size of the struct.
Changing this property changes the value of the length property.
This property cannot be set to zero.
The initial value of this property is 1, indicating that each element contains one byte.
|
readwritenonatomicassign |
Indicates that the data is ready to be used.
This property has no internal use. The application can use this property to indicate that this data array has been populated with data and is ready for use.