ObjFW
|
A class for storing objects in an array. More...
#include <OFArray.h>
Public Member Functions | |
id | initWithObject: (id obj) |
id | initWithObjects: (id first,[,]...) |
id | initWithObject:argList: (id first,[argList] va_list args) |
id | initWithCArray: (id *objs) |
id | initWithCArray:length: (id *objs,[length] size_t len) |
id * | cArray () |
id | objectAtIndex: (size_t index) |
size_t | indexOfObject: (id obj) |
size_t | indexOfObjectIdenticalTo: (id obj) |
id | firstObject () |
id | lastObject () |
OFArray * | objectsFromIndex:toIndex: (size_t start,[toIndex] size_t end) |
OFArray * | objectsInRange: (of_range_t range) |
OFString * | componentsJoinedByString: (OFString *separator) |
void | makeObjectsPerformSelector: (SEL selector) |
void | makeObjectsPerformSelector:withObject: (SEL selector,[withObject] id obj) |
void | enumerateObjectsUsingBlock: (of_array_enumeration_block_t block) |
OFArray * | mappedArrayUsingBlock: (of_array_map_block_t block) |
OFArray * | filteredArrayUsingBlock: (of_array_filter_block_t block) |
Static Public Member Functions | |
id | array () |
id | arrayWithObject: (id obj) |
id | arrayWithObjects: (id first,[,]...) |
id | arrayWithCArray: (id *objs) |
id | arrayWithCArray:length: (id *objs,[length] size_t len) |
Protected Attributes | |
OFDataArray * | array |
A class for storing objects in an array.
id OFArray::array | ( | ) | [static, virtual] |
id OFArray::arrayWithCArray: | ( | id* | objs | ) | [static, virtual] |
id OFArray::arrayWithCArray:length: | ( | id* | objs, |
[length] size_t | len | ||
) | [static, virtual] |
id OFArray::arrayWithObject: | ( | id | obj | ) | [static, virtual] |
id OFArray::arrayWithObjects: | ( | id | first, |
[,] | ... | ||
) | [static, virtual] |
id * OFArray::cArray | ( | ) | [virtual] |
Creates a string by joining all objects of the array.
separator | The string with which the objects should be joined |
void OFArray::enumerateObjectsUsingBlock: | ( | of_array_enumeration_block_t | block | ) | [virtual] |
Executes a block for each object.
block | The block to execute for each object |
OFArray * OFArray::filteredArrayUsingBlock: | ( | of_array_filter_block_t | block | ) | [virtual] |
Returns a new array, only containing the objects for which the block returns YES.
block | A block which determines if the object should be in the new array |
id OFArray::firstObject | ( | ) | [virtual] |
Returns the first object of the array or nil.
The returned object is not retained and autoreleased for performance reasons!
size_t OFArray::indexOfObject: | ( | id | obj | ) | [virtual] |
Returns the index of the first object that is equivalent to the specified object or OF_INVALID_INDEX if it was not found.
obj | The object whose index is returned |
size_t OFArray::indexOfObjectIdenticalTo: | ( | id | obj | ) | [virtual] |
Returns the index of the first object that has the same address as the specified object or OF_INVALID_INDEX if it was not found.
obj | The object whose index is returned |
id OFArray::initWithCArray: | ( | id* | objs | ) | [virtual] |
id OFArray::initWithCArray:length: | ( | id* | objs, |
[length] size_t | len | ||
) | [virtual] |
id OFArray::initWithObject: | ( | id | obj | ) | [virtual] |
id OFArray::initWithObject:argList: | ( | id | first, |
[argList] va_list | args | ||
) | [virtual] |
id OFArray::initWithObjects: | ( | id | first, |
[,] | ... | ||
) | [virtual] |
id OFArray::lastObject | ( | ) | [virtual] |
Returns the last object of the array or nil.
The returned object is not retained and autoreleased for performance reasons!
void OFArray::makeObjectsPerformSelector: | ( | SEL | selector | ) | [virtual] |
Performs the specified selector on all objects in the array.
selector | The selector to perform on all objects in the array |
void OFArray::makeObjectsPerformSelector:withObject: | ( | SEL | selector, |
[withObject] id | obj | ||
) | [virtual] |
Performs the specified selector on all objects in the array with the specified object.
selector | The selector to perform on all objects in the array |
obj | The object to perform the selector with on all objects in the array |
OFArray * OFArray::mappedArrayUsingBlock: | ( | of_array_map_block_t | block | ) | [virtual] |
Returns a new array, mapping each object using the specified block.
block | A block which maps an object for each object |
id OFArray::objectAtIndex: | ( | size_t | index | ) | [virtual] |
Returns a specific object of the array.
The returned object is not retained and autoreleased for performance reasons!
index | The number of the object to return |
OFArray * OFArray::objectsFromIndex:toIndex: | ( | size_t | start, |
[toIndex] size_t | end | ||
) | [virtual] |
OFArray * OFArray::objectsInRange: | ( | of_range_t | range | ) | [virtual] |