Main Page | Class List | File List | Class Members | File Members

CList Interface Reference

CList operates list of objects. More...

#import <clist.h>

List of all members.

Public Member Functions

(id) initList:
 Initialize list.

(void) dealloc
 Release resource for the object.

(id) setNextNode:
 Set next node.

(id) setPrevNode:
 Set previous node.

(id) obj
 Get element object.

(id) set:
 Set element object.

(uint_t) num
 Get number of data in list.

(CList *) next
 Get next node.

(CList *) prev
 Get previous node.

(CList *) first
 Get first node of the list.

(CList *) last
 Get last node of the list.

(CList *) addObject:
 Add new next node and set the new element.

(CList *) insertObject:
 Insert new previous node and set the new element.

(CList *) appendObject:
 Append node to last and set the new element.

(CList *) prependObject:
 Prepend node to head of the list and set the new element.


Static Public Member Functions

(CList *) appendObject:after:
 Add new object to the tail of the list.

(void) link:after:
 Link src2 list after src1 list.


Protected Attributes

id current_obj
CListlist_next
CListlist_prev


Detailed Description

CList operates list of objects.

Description
CList operates list of objects.


Member Function Documentation

- (CList *) CList: (id) 
(id) 
(id)  obj
 

Add new next node and set the new element.

Returns:
New added node.
Parameters:
obj New element to add.
Description
Add new next node and set the new element to it.

- (CList *) CList: (id) 
(id) 
(id)  obj
 

Append node to last and set the new element.

Returns:
New appended node.
Parameters:
obj New element to add.
Description
Append node to last and set the new element to it.

+ (CList *) CList: (id) 
(id) 
(id)  obj
after: (id) 
(CList *) 
(id)  list
 

Add new object to the tail of the list.

Returns:
1st node of linked list.
Parameters:
obj Object to add to list as last item.
list Destination list to add new object.
Description
Link src2 list after src1. Check following specification:
  1. If "list" is nil, The new list which contains only "obj" is generated and returned.
  2. In the other case, the new item which contains "obj" is generated and added to the last of "list".

- (void) CList:
 

Release resource for the object.

Description
Release resource for the object.

- (CList *) CList:
 

Get first node of the list.

Description
Get first node of the list.
Returns:
First node or nil.

- (id) CList: (id) 
(id) 
(id)  obj
 

Initialize list.

Description
Initialize list.
Parameters:
obj Content of the list.
Returns:
The object itself.

- (CList *) CList: (id) 
(id) 
(id)  obj
 

Insert new previous node and set the new element.

Returns:
New inserted node.
Parameters:
obj New element to add.
Description
Insert new previous node and set the new element to it.

- (CList *) CList:
 

Get last node of the list.

Description
Get last node of the list.
Returns:
Last node or nil.

+ (void) CList: (id) 
(CList *) 
(id)  src1
after: (id) 
(CList *) 
(id)  src2
 

Link src2 list after src1 list.

Returns:
Linked list.
Parameters:
src1 Next list. The previous link of it is replaced.
src2 Previous node. The next link of it is replaced.
Description
Link src2 list after src1. Check following specification:
  • The previous link of src1 is replaced by src2.
  • The next link of src2 is replaced by src1.

- (CList *) CList:
 

Get next node.

Description
Get next node.
Returns:
Next node or nil.

- (uint_t) CList:
 

Get number of data in list.

Returns:
Number of data.
Description
Get number of data in list.

- (id) CList:
 

Get element object.

Description
Get element object.

- (CList *) CList: (id) 
(id) 
(id)  obj
 

Prepend node to head of the list and set the new element.

Returns:
New prepended node.
Parameters:
obj New element to add.
Description
Prepend node to head of the list and set the new element.

- (CList *) CList:
 

Get previous node.

Description
Get previois node.
Returns:
Previous node or nil.

- (id) CList: (id) 
(id) 
(id)  obj
 

Set element object.

Description
Set element object.
Parameters:
obj Object to replace current one.

- (id) CList: (id) 
(CList *) 
(id)  node
 

Set next node.

Description
Set next node.

- (id) CList: (id) 
(CList *) 
(id)  node
 

Set previous node.

Description
Set previous node.


Member Data Documentation

id CList::current_obj [protected]
 

Content object

CList* CList::list_next [protected]
 

Pointer for next line

CList* CList::list_prev [protected]
 

Pointer for previous line


The documentation for this interface was generated from the following file:
Generated on Wed Jul 14 18:34:59 2004 for Coconut by doxygen 1.3.6