ObjFW
Public Member Functions | Protected Attributes
OFMutableArray Class Reference

A class for storing, adding and removing objects in an array. More...

#include <OFMutableArray.h>

Inheritance diagram for OFMutableArray:
OFArray OFObject <OFCopying> <OFMutableCopying> <OFCollection> <OFFastEnumeration> <OFObject> <OFObject>

List of all members.

Public Member Functions

void addObject: (id obj)
void addObject:atIndex: (id obj,[atIndex] size_t index)
void replaceObject:withObject: (id old,[withObject] id new_)
void replaceObjectAtIndex:withObject: (size_t index,[withObject] id obj)
void replaceObjectIdenticalTo:withObject: (id old,[withObject] id new_)
void removeObject: (id obj)
void removeObjectIdenticalTo: (id obj)
void removeObjectAtIndex: (size_t index)
void removeNObjects: (size_t nobjects)
void removeNObjects:atIndex: (size_t nobjects,[atIndex] size_t index)
void replaceObjectsUsingBlock: (of_array_replace_block_t block)

Protected Attributes

unsigned long mutations

Detailed Description

A class for storing, adding and removing objects in an array.


Member Function Documentation

void OFMutableArray::addObject: ( id  obj) [virtual]

Adds an object to the OFArray.

Parameters:
objAn object to add
void OFMutableArray::addObject:atIndex: ( id  obj,
[atIndex] size_t  index 
) [virtual]

Adds an object to the OFArray at the specified index.

Parameters:
objAn object to add
indexThe index where the object should be added
void OFMutableArray::removeNObjects: ( size_t  nobjects) [virtual]

Removes the specified amount of objects from the end of the OFArray.

Parameters:
nobjectsThe number of objects to remove
void OFMutableArray::removeNObjects:atIndex: ( size_t  nobjects,
[atIndex] size_t  index 
) [virtual]

Removes the specified amount of objects at the specified index.

Parameters:
nobjectsThe number of objects to remove
indexThe index at which the objects are removed
void OFMutableArray::removeObject: ( id  obj) [virtual]

Removes the first object equivalent to the specified object.

Parameters:
objThe object to remove
void OFMutableArray::removeObjectAtIndex: ( size_t  index) [virtual]

Removes the object at the specified index.

Parameters:
indexThe index of the object to remove
void OFMutableArray::removeObjectIdenticalTo: ( id  obj) [virtual]

Removes the first object that has the same address as the specified object.

Parameters:
objThe object to remove
void OFMutableArray::replaceObject:withObject: ( id  old,
[withObject] id  new_ 
) [virtual]

Replaces the first object equivalent to the first specified object with the second specified object.

Parameters:
oldThe object to replace
new_The replacement object
void OFMutableArray::replaceObjectAtIndex:withObject: ( size_t  index,
[withObject] id  obj 
) [virtual]

Replaces the object at the specified index with the specified object.

Parameters:
indexThe index of the object to replace
objThe replacement object
void OFMutableArray::replaceObjectIdenticalTo:withObject: ( id  old,
[withObject] id  new_ 
) [virtual]

Replaces the first object that has the same address as the first specified object with the second specified object.

Parameters:
oldThe object to replace
new_The replacement object
void OFMutableArray::replaceObjectsUsingBlock: ( of_array_replace_block_t  block) [virtual]

Replaces each object with the object returned by the block.

Parameters:
blockThe block which returns a new object for each object

The documentation for this class was generated from the following files:
 All Classes Functions Variables