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

#import <CC3NodeListeners.h>

Inheritance diagram for CC3NodeTransformListeners:
Inheritance graph
[legend]

Instance Methods

(void) - addTransformListener:
 
(id) - initForNode:
 
(void) - notifyDestructionListeners
 
(void) - notifyTransformListeners
 
(void) - removeAllTransformListeners
 
(void) - removeTransformListener:
 

Class Methods

(id) + listenersForNode:
 

Properties

NSUInteger count
 
BOOL isEmpty
 
NSSet * transformListeners
 

Detailed Description

Manages a collection of transform listeners on behalf of a CC3Node.

Method Documentation

- (void) addTransformListener: (id< CC3NodeTransformListenerProtocol >)  aListener

Adds the specified object as a transform listener.

It is safe to invoke this method more than once for the same listener, or with a nil listener. In either case, this method simply ignores the request.

Transform listeners are weakly referenced. Each listener should know who it has subscribed to, and must remove itself as a listener (using the removeTransformListener: method) when appropriate, such as when being deallocated.

- (id) initForNode: (CC3Node *)  node

Initializes this instance to track transform listeners for the specified node.

+ (id) listenersForNode: (CC3Node *)  node

Allocates and initializes an instance to track transform listeners for the specified node.

- (void) notifyDestructionListeners

Notify the transform listeners that the node has been destroyed.

- (void) notifyTransformListeners

Notify the transform listeners that the node has been transformed.

- (void) removeAllTransformListeners

Removes all transform listeners.

- (void) removeTransformListener: (id< CC3NodeTransformListenerProtocol >)  aListener

Removes the specified object as a transform listener.

It is safe to invoke this method with a listener that was not previously added, or with a nil listener. In either case, this method simply ignores the request.

Property Documentation

- (NSUInteger) count
readnonatomicassign

Returns the number of listeners.

- (BOOL) isEmpty
readnonatomicassign

Returns whether there are no listeners.

- (NSSet*) transformListeners
readnonatomicretain

Returns a copy of the collection of objects that have requested that they be notified whenever the transform of the node has changed.

Each object in the returned collection implements the CC3NodeTransformListenerProtocol, and will be sent the nodeWasTransformed: notification message when the transform of this node changes.

Objects can be added to this collection by using the addTransformListener: method, and removed using the removeTransformListener: method. This property returns a copy of the collection stored in this node. You can safely invoke the addTransformListener: or removeTransformListener: methods while iterating the returned collection.

Transform listeners are weakly referenced. Each listener should know who it has subscribed to, and must remove itself as a listener (using the removeTransformListener: method) when appropriate, such as when being deallocated.


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