axlListCursor* axl_list_cursor_new ( axlList list  ) 

Allows to get a cursor to iterate the list in a linear and efficient way.

The axlListCursor could be used to iterate an axlList in an efficient way because it stores current state (position). Then using the following functions you can modify the state (current position to get):

Finally, a function is provided to get the data stored at a particular position, pointed by the current status of the cursor:

You are allowed to remove elements from the list (axlList) having a cursor created (axlListCursor), using axl_list_cursor_unlink.

Here is an example:

 axlPointer      value;
 axlListCursor * cursor;
 
 // create the cursor 
 cursor   = axl_list_cursor_new (list);

 // while there are more elements 
 while (axl_list_cursor_has_item (cursor)) {

   // get the value 
   value = axl_list_cursor_get (cursor);


   // get the next 
   axl_list_cursor_next (cursor);

   // update the iterator 
   iterator++;
                
 } 

 // free the cursor 
 axl_list_cursor_free (cursor);

Parameters:
list The list that the new cursor (axlListCursor) will provide access.
Returns:
A newly created axlListCursor used to iterate the list. Once finished you must call to axl_list_cursor_free.