Datalist
Object Hierarchy:
Description:
[ CCode ( cname = "GData*" , has_type_id = false ) ]
[ GIR ( name = "Data" ) ]
public struct Datalist<G>
Content:
Creation methods:
Methods:
- public void @foreach (DataForeachFunc<G> func)
Calls the given function for each data element of the datalist.
- public void clear ()
Frees all the data elements of the datalist.
- public unowned G get_data (string key)
Gets a data element, using its string identifier.
- public G id_dup_data (Quark key_id, DuplicateFunc<G> dup_func)
This is a variant of
id_get_data which returns a 'duplicate' of the value.
- public unowned G id_get_data (Quark key_id)
Retrieves the data element corresponding to key_id
.
- public void id_remove_data (Quark key_id)
- public G id_remove_no_notify (Quark key_id)
Removes an element, without calling its destroy notification function.
- public bool id_replace_data (Quark key_id, G oldval, owned G newval, DestroyNotify? destroy, out DestroyNotify? old_destroy)
Compares the member that is associated with key_id
in
datalist
to oldval
, and if they are the same, replace oldval
with newval
.
- public void id_set_data (Quark key_id, owned G data)
- public void id_set_data_full (Quark key_id, owned G data, DestroyNotify? destroy_func)
Sets the data corresponding to the given
Quark id, and the function to be called when the element is removed from the datalist.
- public void remove_data (string key)
- public G remove_no_notify (string key)
- public void set_data (string key, owned G data)
- public void set_data_full (string key, owned G data, DestroyNotify? destry_func)