OFList Class Reference

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

#import <OFList.h>

Inheritance diagram for OFList:
OFObject <OFCopying>

List of all members.

Public Member Functions

(of_list_object_t *) - first
(of_list_object_t *) - last
(of_list_object_t *) - append:
(of_list_object_t *) - prepend:
(of_list_object_t *) - insert:before:
(of_list_object_t *) - insert:after:
(id) - remove:
(size_t) - count

Static Public Member Functions

(id) + list

Protected Attributes

of_list_object_tfirst
of_list_object_tlast
size_t count

Detailed Description

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


Member Function Documentation

- (of_list_object_t *) append: (OFObject*)  obj  

Appends an object to the list.

Parameters:
obj The 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.
- (size_t) count  
Returns:
The number of items in the list.
- (of_list_object_t*) first  
Returns:
The first list object in the list
- (of_list_object_t *) insert: (OFObject*)  obj
after: (of_list_object_t*)  listobj 

Inserts an object after another object.

Parameters:
obj The object to insert
listobj The 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 *) insert: (OFObject*)  obj
before: (of_list_object_t*)  listobj 

Inserts an object before another object.

Parameters:
obj The object to insert
listobj The 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*) last  
Returns:
The last list object in the list
+ (id) list  
Returns:
A new autoreleased OFList
- (of_list_object_t *) prepend: (OFObject*)  obj  

Prepends an object to the list.

Parameters:
obj The 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.
- (id) remove: (of_list_object_t*)  listobj  

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

Parameters:
listobj The list object returned by append / prepend

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

Generated on Sun Mar 14 13:41:06 2010 for ObjFW by  doxygen 1.6.1