PtrArray


Object Hierarchy:

Object hierarchy for PtrArray

Description:

[ Compact ]
[ Version ( deprecated_since = "vala-0.26" , replacement = "GenericArray" , 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

Warning: PtrArray is deprecated since vala-0.26. Use GenericArray.

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


Namespace: GLib
Package: glib-2.0

Content:

Creation methods:

Methods:

Fields: