Public Member Functions | Protected Attributes

CC3NodeArraySequencer Class Reference

An CC3NodeArraySequencer is a type of CC3NodeSequencer that arranges nodes into an array, and orders the nodes in the array by some criteria. More...

#import <CC3NodeSequencer.h>

Inheritance diagram for CC3NodeArraySequencer:
Inheritance graph
[legend]
Collaboration diagram for CC3NodeArraySequencer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(BOOL) - shouldInsertNode:between:and:withVisitor:

Protected Attributes

CCArray * nodes

Detailed Description

An CC3NodeArraySequencer is a type of CC3NodeSequencer that arranges nodes into an array, and orders the nodes in the array by some criteria.

When a node is added, it is first evaluated by the contained evaluator. If it is accepted, the sequencer iterates through the existing nodes that it holds, invoking the template method shouldInsertNode:between:and:withVisitor: on each pair of sequential existing nodes, looking for the place to insert the new node. The node is inserted the first time that template method returns YES. If not suitable insertion point is found, the node is added to the end of the array.

This base class simply arranges the nodes in the order they are presented, by always adding to the end of the contained array of nodes. Subclasses will customize the way that the nodes are ordered and grouped in the array.

The contents of the nodes array are not copied when this sequencer is copied.


Member Function Documentation

- (BOOL) shouldInsertNode: (CC3Node *)  aNode
between: (CC3Node *)  leftNode
and: (CC3Node *)  rightNode
withVisitor: (CC3NodeSequencerVisitor *)  visitor 

Attempts to insert the specified node between two specified nodes that already exist in the array, and returns whether it was inserted at that location.

This default implementation always returns NO, resulting in each node always being added to the end of the array.


Member Data Documentation

- (CCArray*) nodes [protected]

Returns an array of the nodes that have been added to this sequencer, ordered as this sequencer defines.

The returned array is a copy of the any internal arrays. Changing the contents will not change the internal node seqeunce.

Implements CC3NodeSequencer.


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