v2.0.2
Instance Methods | Class Methods | Properties | List of all members
CC3DataArray Class Reference

#import <CC3DataArray.h>

Inheritance diagram for CC3DataArray:
Inheritance graph
[legend]

Instance Methods

(void *) - elementAt:
 
(void) - ensureElementCapacity:
 
(id) - initWithElementSize:
 

Class Methods

(id) + dataArrayWithElementSize:
 

Properties

NSUInteger elementCapacity
 
NSUInteger elementSize
 
BOOL isReady
 

Detailed Description

CC3DataArray manages data as an array of structure elements.

Method Documentation

+ (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.

Property Documentation

- (NSUInteger) elementCapacity
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.

- (NSUInteger) elementSize
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.

- (BOOL) isReady
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.


The documentation for this class was generated from the following file: