Functions
g_dataset_id_set_data()
#define g_dataset_id_set_data(l, k, d)
Sets the data element associated with the given GQuark id. Any
previous data with the same key is removed, and its destroy function
is called.
g_dataset_id_set_data_full ()
void
g_dataset_id_set_data_full (gconstpointer dataset_location,
GQuark key_id,
gpointer data,
GDestroyNotify destroy_func);
Sets the data element associated with the given GQuark id, and also
the function to call when the data element is destroyed. Any
previous data with the same key is removed, and its destroy function
is called.
[skip]
GDestroyNotify ()
void
(*GDestroyNotify) (gpointer data);
Specifies the type of function which is called when a data element
is destroyed. It is passed the pointer to the data element and
should free any memory and resources allocated for it.
g_dataset_id_get_data ()
gpointer
g_dataset_id_get_data (gconstpointer dataset_location,
GQuark key_id);
Gets the data element corresponding to a GQuark.
Returns
the data element corresponding to
the GQuark, or NULL if it is not found.
[transfer none][nullable]
g_dataset_id_remove_data()
#define g_dataset_id_remove_data(l, k)
Removes a data element from a dataset. The data element's destroy
function is called if it has been set.
g_dataset_id_remove_no_notify ()
gpointer
g_dataset_id_remove_no_notify (gconstpointer dataset_location,
GQuark key_id);
Removes an element, without calling its destroy notification
function.
[skip]
Returns
the data previously stored at key_id
,
or NULL if none.
[nullable]
g_dataset_set_data()
#define g_dataset_set_data(l, k, d)
Sets the data corresponding to the given string identifier.
g_dataset_set_data_full()
#define g_dataset_set_data_full(l, k, d, f)
Sets the data corresponding to the given string identifier, and the
function to call when the data element is destroyed.
g_dataset_get_data()
#define g_dataset_get_data(l, k)
Gets the data element corresponding to a string.
Returns
the data element corresponding to
the string, or NULL if it is not found.
[transfer none][nullable]
g_dataset_remove_data()
#define g_dataset_remove_data(l, k)
Removes a data element corresponding to a string. Its destroy
function is called if it has been set.
g_dataset_remove_no_notify()
#define g_dataset_remove_no_notify(l, k)
Removes an element, without calling its destroy notifier.
g_dataset_foreach ()
void
g_dataset_foreach (gconstpointer dataset_location,
GDataForeachFunc func,
gpointer user_data);
Calls the given function for each data element which is associated
with the given location. Note that this function is NOT thread-safe.
So unless dataset_location
can be protected from any modifications
during invocation of this function, it should not be called.
func
can make changes to the dataset, but the iteration will not
reflect changes made during the g_dataset_foreach() call, other
than skipping over elements that are removed.
g_dataset_destroy ()
void
g_dataset_destroy (gconstpointer dataset_location);
Destroys the dataset, freeing all memory allocated, and calling any
destroy functions set for data elements.