ObjFW
Public Member Functions | Static Public Member Functions
OFList Class Reference

A class which provides easy to use double-linked lists. More...

#import <OFList.h>

Inheritance diagram for OFList:
OFObject <OFCopying> <OFCollection> <OFSerialization> <OFObject> <OFEnumerating> <OFFastEnumeration>

List of all members.

Public Member Functions

(of_list_object_t *) - firstListObject
 Returns the first list object of the list.
(of_list_object_t *) - lastListObject
 Retrusn the last list object of the list.
(of_list_object_t *) - appendObject:
 Appends an object to the list.
(of_list_object_t *) - prependObject:
 Prepends an object to the list.
(of_list_object_t *) - insertObject:beforeListObject:
 Inserts an object before another list object.
(of_list_object_t *) - insertObject:afterListObject:
 Inserts an object after another list object.
(void) - removeListObject:
 Removes the object with the specified list object from the list.
(BOOL) - containsObjectIdenticalTo:
 Checks whether the list contains an object with the specified address.
(id) - firstObject
 Returns the first object of the list or nil.
(id) - lastObject
 Returns the last object of the list or nil.

Static Public Member Functions

(id) + list
 Creates a new OFList.

Detailed Description

A class which provides easy to use double-linked lists.


Member Function Documentation

- (of_list_object_t *) appendObject: (id)  object

Appends an object to the list.

Parameters:
objectThe object to append
Returns:
An of_list_object_t, needed to identify the object inside the list. For example, if you want to remove an object from the list, you need its of_list_object_t.
- (BOOL) containsObjectIdenticalTo: (id)  object

Checks whether the list contains an object with the specified address.

Parameters:
objectThe object which is checked for being in the list
Returns:
A boolean whether the list contains an object with the specified address.
- (of_list_object_t*) firstListObject

Returns the first list object of the list.

Returns:
The first list object of the list
- (id) firstObject

Returns the first object of the list or nil.

The returned object is not retained and autoreleased for performance reasons!

Returns:
The first object of the list or nil
- (of_list_object_t *) insertObject: (id)  object
afterListObject: (of_list_object_t*)  listObject 

Inserts an object after another list object.

Parameters:
objectThe object to insert
listObjectThe of_list_object_t of the object after which it should be inserted
Returns:
An of_list_object_t, needed to identify the object inside the list. For example, if you want to remove an object from the list, you need its of_list_object_t.
- (of_list_object_t *) insertObject: (id)  object
beforeListObject: (of_list_object_t*)  listObject 

Inserts an object before another list object.

Parameters:
objectThe object to insert
listObjectThe of_list_object_t of the object before which it should be inserted
Returns:
An of_list_object_t, needed to identify the object inside the list. For example, if you want to remove an object from the list, you need its of_list_object_t.
- (of_list_object_t*) lastListObject

Retrusn the last list object of the list.

Returns:
The last list object of the list
- (id) lastObject

Returns the last object of the list or nil.

The returned object is not retained and autoreleased for performance reasons!

Returns:
The last object of the list or nil
+ (id) list

Creates a new OFList.

Returns:
A new autoreleased OFList
- (of_list_object_t *) prependObject: (id)  object

Prepends an object to the list.

Parameters:
objectThe object to prepend
Returns:
An of_list_object_t, needed to identify the object inside the list. For example, if you want to remove an object from the list, you need its of_list_object_t.
- (void) removeListObject: (of_list_object_t*)  listObject

Removes the object with the specified list object from the list.

Parameters:
listObjectThe list object returned by append / prepend

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