Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

hashlist.h File Reference

#include <glib.h>

Go to the source code of this file.

Typedefs

typedef hash_list_iter hash_list_iter_t
typedef hash_list hash_list_t

Functions

hash_list_thash_list_new (void)
 Create a new hash list.

void hash_list_free (hash_list_t *hl)
 Dispose of the data structure, but not of the items it holds.

void hash_list_clear (hash_list_t *hl)
 Clear the structure.

void hash_list_remove (hash_list_t *hl, gpointer data)
 Remove `data' from the list.

void hash_list_append (hash_list_t *hl, gpointer data)
 Append `data' to the list.

void hash_list_prepend (hash_list_t *hl, gpointer data)
 Prepend `data' to the list.

gpointer hash_list_first (const hash_list_t *hl)
gpointer hash_list_last (const hash_list_t *hl)
gint hash_list_length (const hash_list_t *hl)
hash_list_iter_thash_list_iterator (hash_list_t *hl)
 Get an iterator on the list, positionned before first item.

hash_list_iter_thash_list_iterator_last (hash_list_t *hl)
 Get an iterator on the list, positionned after last item.

void hash_list_release (hash_list_iter_t *i)
 Release the iterator once we're done with it.

gboolean hash_list_has_next (const hash_list_iter_t *i)
 Checks whether there is a next item to be iterated over.

gboolean hash_list_has_previous (const hash_list_iter_t *i)
 Checks whether there is a previous item in the iterator.

gboolean hash_list_has_follower (const hash_list_iter_t *i)
 Checks whether there is a following item in the iterator, in the direction chosen at creation time.

gpointer hash_list_next (hash_list_iter_t *i)
 Get the next data item from the iterator, or NULL if none.

gpointer hash_list_previous (hash_list_iter_t *i)
 Get the previous data item from the iterator, or NULL if none.

gpointer hash_list_follower (hash_list_iter_t *i)
 Move to next item in the direction of the iterator.

gboolean hash_list_contains (hash_list_t *hl, gpointer data)
 Check whether hashlist contains the `data'.

void hash_list_foreach (const hash_list_t *hl, GFunc func, gpointer user_data)
 Apply `func' to all the items in the structure.


Typedef Documentation

typedef struct hash_list_iter hash_list_iter_t
 

typedef struct hash_list hash_list_t
 


Function Documentation

void hash_list_append hash_list_t hl,
gpointer  data
 

Append `data' to the list.

void hash_list_clear hash_list_t hl  ) 
 

Clear the structure.

Items are simply de-referenced, not freed.

gboolean hash_list_contains hash_list_t hl,
gpointer  data
 

Check whether hashlist contains the `data'.

gpointer hash_list_first const hash_list_t hl  ) 
 

Returns:
the first item of the list, or NULL if none.

gpointer hash_list_follower hash_list_iter_t i  ) 
 

Move to next item in the direction of the iterator.

void hash_list_foreach const hash_list_t hl,
GFunc  func,
gpointer  user_data
 

Apply `func' to all the items in the structure.

void hash_list_free hash_list_t hl  ) 
 

Dispose of the data structure, but not of the items it holds.

gboolean hash_list_has_follower const hash_list_iter_t i  ) 
 

Checks whether there is a following item in the iterator, in the direction chosen at creation time.

gboolean hash_list_has_next const hash_list_iter_t i  ) 
 

Checks whether there is a next item to be iterated over.

gboolean hash_list_has_previous const hash_list_iter_t i  ) 
 

Checks whether there is a previous item in the iterator.

hash_list_iter_t* hash_list_iterator hash_list_t hl  ) 
 

Get an iterator on the list, positionned before first item.

Get items with hash_list_next().

hash_list_iter_t* hash_list_iterator_last hash_list_t hl  ) 
 

Get an iterator on the list, positionned after last item.

Get items with hash_list_previous().

gpointer hash_list_last const hash_list_t hl  ) 
 

Returns:
the last item of the list, or NULL if none.

gint hash_list_length const hash_list_t hl  ) 
 

Returns:
the length of the list.

hash_list_t* hash_list_new void   ) 
 

Create a new hash list.

gpointer hash_list_next hash_list_iter_t i  ) 
 

Get the next data item from the iterator, or NULL if none.

void hash_list_prepend hash_list_t hl,
gpointer  data
 

Prepend `data' to the list.

gpointer hash_list_previous hash_list_iter_t i  ) 
 

Get the previous data item from the iterator, or NULL if none.

void hash_list_release hash_list_iter_t i  ) 
 

Release the iterator once we're done with it.

void hash_list_remove hash_list_t hl,
gpointer  data
 

Remove `data' from the list.


Generated on Sun Feb 12 10:50:02 2006 for Gtk-Gnutella by doxygen 1.3.6