PtrArray
Object Hierarchy:
Description:
[
Compact ]
[
Version ( since =
"2.22" ) ]
[
CCode ( ref_function =
"g_ptr_array_ref" , type_id =
"G_TYPE_PTR_ARRAY" , unref_function =
"g_ptr_array_unref" ) ]
public class PtrArray :
GenericArray<
void*>
Example: Apply a function to each element:
public static int main (string[] args) {
PtrArray array = new PtrArray ();
array.add ("first entry");
array.add ("second entry");
array.add ("third entry");
// Output:
// ``first entry``
// ``second entry``
// ``third entry``
array.foreach ((ptr) => {
print ("%s\n", (string) ptr);
});
return 0;
}
valac --pkg glib-2.0 GLib.PtrArray.foreach.vala
Content:
Creation methods:
Methods:
Inherited Members:
All known members inherited from class GLib.GenericArray