W Wrapl, The Programming Language

Libraries:Gtk:Glib:GHashTableIter

Types

T

Constants

Nil : T

Functions

_Alloc() : Gtk.Glib.GHashTableIter.T



Methods

:"="(_ @ T, _ @ T)

:GetHashTable(self @ T) : Gtk.Glib.GHashTable.T

Returns the Gtk.Glib.GHashTable.T associated with iter.

iter an initialized T.
Returns the Gtk.Glib.GHashTable.T associated with iter.


:Init(self @ T, hash_table @ Gtk.Glib.GHashTable.T) : Std.Object.T

Initializes a key/value pair iterator and associates it with hash_table. Modifying the hash table after calling this function invalidates the returned iterator.

1
2
3
4
5
6
7
8
GHashTableIter iter;
gpointer key, value;

g_hash_table_iter_init (&iter, hash_table);
while (g_hash_table_iter_next (&iter, &key, &value)) 
  {
    /* do something with key and value */
  }


:Next(self @ T, key @ Std.Object.T, value @ Std.Object.T) : Std.Symbol.T

Advances iter and retrieves the key and/or value that are now pointed to as a result of this advancement. If FALSE is returned, key and value are not set, and the iterator becomes invalid.

iter an initialized T.
key a location to store the key, or NULL.
value a location to store the value, or NULL.
Returns FALSE if the end of the Gtk.Glib.GHashTable.T has been reached.


:Remove(self @ T) : Std.Object.T

Removes the key/value pair currently pointed to by the iterator from its associated Gtk.Glib.GHashTable.T. Can only be called after Next returned TRUE, and cannot be called more than once for the same key/value pair.

If the Gtk.Glib.GHashTable.T was created using g_hash_table_new_full(), the key and value are freed using the supplied destroy functions, otherwise you have to make sure that any dynamically allocated values are freed yourself.

iter an initialized T.


:Steal(self @ T) : Std.Object.T

Removes the key/value pair currently pointed to by the iterator from its associated Gtk.Glib.GHashTable.T, without calling the key and value destroy functions. Can only be called after Next returned TRUE, and cannot be called more than once for the same key/value pair.

iter an initialized T.


:"~="(_ @ T, _ @ T)