Example: Get the length of the ancestry of the type

public abstract class AbstractGObject : Object {}

public static int main (string[] args) {
// Output: ``2``
Type type = typeof (AbstractGObject);
print (" %u\n", type.depth ());
return 0;
}

 valac --pkg gobject-2.0 GLib.Type.depth.vala

See:




2022 vala-language.org