Public Member Functions

CCArray(CC3) Class Reference

Extension category to support cocos3d functionality. More...

#import <CC3Foundation.h>

List of all members.

Public Member Functions

(void) - addUnretainedObject:
(NSString *) - fullDescription
(NSUInteger) - indexOfObjectIdenticalTo:
(void) - insertUnretainedObject:atIndex:
(void) - releaseAsUnretained
(void) - removeAllObjectsAsUnretained
(void) - removeObjectIdenticalTo:
(void) - removeUnretainedObjectAtIndex:
(void) - removeUnretainedObjectIdenticalTo:
(void) - replaceObjectAtIndex:withObject:

Detailed Description

Extension category to support cocos3d functionality.

This extension includes a number of methods that add or remove objects to and from the array without retaining and releasing them. These methods are identified by the word Unretained in their names, and are faster than their standard equivalent methods that do retain and release objects.

It is critical that use of these methods is consistent for any object added. If an object is added using an "Unretained" method, then it must be removed using an "Unretained" method.


Member Function Documentation

- (void) addUnretainedObject: (id)  anObject

Adds the specified object to the end of the array, but does not retain the object.

When removing the object, it must not be released. Use one the removeUnretainedObject... methods to remove the object.

- (NSString*) fullDescription

Returns a more detailed description of this instance.

- (NSUInteger) indexOfObjectIdenticalTo: (id)  anObject

Returns the index of the specified object, by comparing objects using the == operator.

- (void) insertUnretainedObject: (id)  anObject
atIndex: (NSUInteger)  index 

Inserts the specified object at the specified index within the array, but does not retain the object.

The elements in the array after the specified index position are shuffled up to make room for the new object.

When removing the object, it must not be released. Use one the removeUnretainedObject... methods to remove the object.

- (void) releaseAsUnretained

Releases the array without releasing each contained object.

All contained objects must not have been retained when added to the array.

- (void) removeAllObjectsAsUnretained

Removes all objects in the array, without releasing them.

All objects being removed must not have been retained when added to the array.

- (void) removeObjectIdenticalTo: (id)  anObject

Removes the specified object, by comparing objects using the == operator.

- (void) removeUnretainedObjectAtIndex: (NSUInteger)  index

Removes the object at the specified index, without releasing it.

The objects after this object in the array are shuffled down to fill in the gap.

The object being removed must not have been retained when added to the array.

- (void) removeUnretainedObjectIdenticalTo: (id)  anObject

Removes the specified object from the array, without releasing it, by comparing objects using the == operator.

The objects after this object in the array are shuffled down to fill in the gap.

The object being removed must not have been retained when added to the array.

- (void) replaceObjectAtIndex: (NSUInteger)  index
withObject: (id)  anObject 

Replaces the object at the specified index with the specified object.


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