void afdal_list_foreach AfDalList list,
GTraverseFunc  func,
gpointer  user_data
 

Allows to perform a foreach around all elements stored inside the given AfDalList.

Here is an example on how to iterate over all elements inside the given AfDalList.

  gboolean my_traverse_function (gpointer key,
                                 gpointer value,
                                 gpointer data)
  {
         // supposing AfDalList have been created to use
         // strings as index
         gchar      * my_key   = key;
  
         // supposing AfDalList have been created to store
         // nodes of MyNodeType.
         MyNodeType * my_value = value;

         // do some stuff.

         // return TRUE to stop traversal or FALSE to continue until
         // the end
         return FALSE;
  }
  
  void my_function (AfDalList * elements) {
 
        // Do some stuff to all elements
        afdal_list_foreach (elements, my_traverse_function, NULL);

        return;
  }

Parameters:
list The AfDalList object to iterate.
func Traverse function to be supplied and executed for each element.
user_data User defined data to be passed in to func.