HashTableIter

A GHashTableIter structure represents an iterator that can be used to iterate over the elements of a #GHashTable. GHashTableIter structures are typically allocated on the stack and then initialized with g_hash_table_iter_init().

Constructors

this
this(GHashTableIter* gHashTableIter, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

getHashTable
HashTable getHashTable()

Returns the #GHashTable associated with @iter.

getHashTableIterStruct
GHashTableIter* getHashTableIterStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

init
void init(HashTable hashTable)

Initializes a key/value pair iterator and associates it with @hash_table. Modifying the hash table after calling this function invalidates the returned iterator. |[<!-- language="C" --> GHashTableIter iter; gpointer key, value;

next
bool next(void* key, void* value)

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.

remove
void remove()

Removes the key/value pair currently pointed to by the iterator from its associated #GHashTable. Can only be called after g_hash_table_iter_next() returned %TRUE, and cannot be called more than once for the same key/value pair.

replace
void replace(void* value)

Replaces the value currently pointed to by the iterator from its associated #GHashTable. Can only be called after g_hash_table_iter_next() returned %TRUE.

steal
void steal()

Removes the key/value pair currently pointed to by the iterator from its associated #GHashTable, without calling the key and value destroy functions. Can only be called after g_hash_table_iter_next() returned %TRUE, and cannot be called more than once for the same key/value pair.

Variables

gHashTableIter
GHashTableIter* gHashTableIter;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta