depth


Description:

public uint depth ()

Returns the length of the ancestry of the passed in type.

This includes the type itself, so that e.g. a fundamental type has depth 1.

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

Parameters:

type

a Type

Returns:

the depth of type