ObjFW
Classes | Typedefs
OFArray.h File Reference
#include <stdarg.h>
#import "OFObject.h"
#import "OFCollection.h"
#import "OFEnumerator.h"
#import "OFSerialization.h"
#import "OFJSONRepresentation.h"
#import "OFMessagePackRepresentation.h"
#import "OFMutableArray.h"

Go to the source code of this file.

Classes

class  OFArray
 An abstract class for storing objects in an array. More...
 

Typedefs

typedef void(^ of_array_enumeration_block_t) (id object, size_t index, bool *stop)
 A block for enumerating an OFArray. More...
 
typedef bool(^ of_array_filter_block_t) (id object, size_t index)
 A block for filtering an OFArray. More...
 
typedef id OF_NONNULL(^ of_array_map_block_t) (id object, size_t index)
 A block for mapping objects to objects in an OFArray. More...
 
typedef id OF_NULLABLE(^ of_array_fold_block_t) (id OF_NULLABLE left, id right)
 A block for folding an OFArray. More...
 

Typedef Documentation

typedef void(^ of_array_enumeration_block_t) (id object, size_t index, bool *stop)

A block for enumerating an OFArray.

Parameters
objectThe current object
indexThe index of the current object
stopA pointer to a variable that can be set to true to stop the enumeration
typedef bool(^ of_array_filter_block_t) (id object, size_t index)

A block for filtering an OFArray.

Parameters
objectThe object to inspect
indexThe index of the object to inspect
Returns
Whether the object should be in the filtered array
typedef id OF_NULLABLE(^ of_array_fold_block_t) (id OF_NULLABLE left, id right)

A block for folding an OFArray.

Parameters
leftThe object to which the object has been folded so far
rightThe object that should be added to the left object
Returns
The left and right side folded into one object
typedef id OF_NONNULL(^ of_array_map_block_t) (id object, size_t index)

A block for mapping objects to objects in an OFArray.

Parameters
objectThe object to map
indexThe index of the object to map
Returns
The object to map to