picofuse-objc

Instance Methods | List of all members
<NXFastEnumeration> Protocol Reference

Objects which can be gone through with a for...in loop. More...

#import <Foundation/Foundation.h>

Inheritance diagram for <NXFastEnumeration>:
Inheritance graph
[legend]

Instance Methods

(unsigned long) - countByEnumeratingWithState:objects:count:
 Returns the next batch of objects for a for...in loop. More...
 

Detailed Description

Objects which can be gone through with a for...in loop.

Foundation's collections adopt it. Other classes can't yet, as the fields of the loop's state are private.

Definition at line 28 of file NXFastEnumeration.h.

Method Documentation

◆ countByEnumeratingWithState:objects:count:()

- (unsigned long) countByEnumeratingWithState: (NXFastEnumerationState *)  state
objects: (id *)  objects
count: (unsigned long)  count 

Returns the next batch of objects for a for...in loop.

Parameters
stateThe loop's state. If the count of changes it's given changes, objc_enumerationMutation() is called, which panics.
objectsRoom for count objects, which can be used for the batch.
countThe number of objects there's room for in objects.
Returns
The number of objects in the batch, or zero when there are no more.

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