ObjFW
Loading...
Searching...
No Matches
Instance Methods | List of all members
<OFFastEnumeration> Protocol Reference

A protocol for fast enumeration. More...

#include <ObjFW/OFEnumerator.h>

Inheritance diagram for <OFFastEnumeration>:
<OFCollection> OFEnumerator OFMapTable OFArray OFDictionary OFList OFSet OFMutableArray OFMutableDictionary OTOrderedDictionary OFSortedList OFMutableSet OFCountedSet

Instance Methods

(int) - countByEnumeratingWithState:objects:count:
 A method which is called by the code produced by the compiler when doing a fast enumeration.
 

Detailed Description

A protocol for fast enumeration.

The OFFastEnumeration protocol needs to be implemented by all classes supporting fast enumeration.

Method Documentation

◆ countByEnumeratingWithState:objects:count:

- (int) countByEnumeratingWithState: (OFFastEnumerationState *) state
objects: (id __unsafe_unretained *) objects
count: (int) count 

A method which is called by the code produced by the compiler when doing a fast enumeration.

Parameters
stateContext information for the enumeration
objectsA pointer to an array where to put the objects
countThe number of objects that can be stored at objects
Returns
The number of objects returned in objects or 0 when the enumeration finished.
Exceptions
OFEnumerationMutationExceptionThe object was mutated during enumeration

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