OFArray Class Reference

#import <OFArray.h>

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

List of all members.

Public Member Functions

(id) - initWithObject:
(id) - initWithObjects:
(id) - initWithObject:argList:
(id) - initWithCArray:
(size_t) - count
(id *) - cArray
(id) - objectAtIndex:
(size_t) - indexOfObject:
(size_t) - indexOfObjectIdenticalTo:
(id) - firstObject
(id) - lastObject
(OFString *) - componentsJoinedByString:
(id) - addObject:
(id) - addObject:atIndex:
(id) - replaceObject:withObject:
(id) - replaceObjectAtIndex:withObject:
(id) - replaceObjectIdenticalTo:withObject:
(id) - removeObject:
(id) - removeObjectIdenticalTo:
(id) - removeObjectAtIndex:
(id) - removeNObjects:
(id) - removeNObjects:atIndex:

Static Public Member Functions

(id) + array
(id) + arrayWithObject:
(id) + arrayWithObjects:
(id) + arrayWithCArray:

Protected Attributes

OFDataArrayarray

Detailed Description

The OFArray class is a class for storing objects in an array.


Member Function Documentation

+ (id) array  
Returns:
A new autoreleased OFArray
+ (id) arrayWithCArray: (OFObject**)  objs  

Creates a new OFArray with the objects from the specified C array.

Parameters:
objs A C array of objects.
Returns:
A new autoreleased OFArray
+ (id) arrayWithObject: (OFObject*)  obj  

Creates a new OFArray with the specified object.

Parameters:
obj An object
Returns:
A new autoreleased OFArray
+ (id) arrayWithObjects: (OFObject*)  first
,   ... 

Creates a new OFArray with the specified objects, terminated by nil.

Parameters:
first The first object in the array
Returns:
A new autoreleased OFArray
- (id *) cArray  
Returns:
The objects of the array as a C array
- (OFString *) componentsJoinedByString: (OFString*)  separator  

Creates a string by joining all objects of the array.

Parameters:
separator The string with which the objects should be joined
Returns:
A string containing all objects joined by the separator
- (size_t) count  
Returns:
The number of objects in the array
- (id) firstObject  
Returns:
The first object of the array or nil
- (size_t) indexOfObject: (OFObject*)  obj  

Returns the index of the first object that is equivalent to the specified object.

Parameters:
obj The object whose index is returned
Returns:
The index of the first object equivalent to the specified object
- (size_t) indexOfObjectIdenticalTo: (OFObject*)  obj  

Returns the index of the first object that has the same address as the specified object.

Parameters:
obj The object whose index is returned
Returns:
The index of the first object that has the same aaddress as the specified object
- (id) initWithCArray: (OFObject**)  objs  

Initializes an OFArray with the objects from the specified C array.

Parameters:
objs A C array of objects
Returns:
An initialized OFArray
- (id) initWithObject: (OFObject*)  obj  

Initializes an OFArray with the specified object.

Parameters:
obj An object
Returns:
An initialized OFArray
- (id) initWithObject: (OFObject*)  first
argList: (va_list)  args 

Initializes an OFArray with the specified object and a va_list.

Parameters:
first The first object
args A va_list
Returns:
An initialized OFArray
- (id) initWithObjects: (OFObject*)  first
,   ... 

Initializes an OFArray with the specified objects.

Parameters:
first The first object
Returns:
An initialized OFArray
- (id) lastObject  
Returns:
The last object of the array or nil
- (id) objectAtIndex: (size_t)  index  

Returns a specific object of the array.

Parameters:
index The number of the object to return
Returns:
The specified object of the OFArray

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

Generated on Thu Dec 24 11:10:00 2009 for ObjFW by  doxygen 1.6.1