is_deep_derivable


Description:

[ CCode ( cname = "G_TYPE_IS_DEEP_DERIVABLE" ) ]
public bool is_deep_derivable ()

Example: Check if type is a deep derivable type (deep):

public interface Interface : Object {}
public abstract class AbstractGObject : Object, Interface {}
public abstract class AbstractSimpleObject {}
public enum Enum { E }

public static int main (string[] args) {
// Output: ``false``
Type type = typeof (Interface);
print (" is-deep-derivable: %s\n", type.is_deep_derivable ().to_string ());

// Output: ``true``
type = typeof (AbstractGObject);
print (" is-deep-derivable: %s\n", type.is_deep_derivable ().to_string ());

// Output: ``true``
type = typeof (AbstractSimpleObject);
print (" is-deep-derivable: %s\n", type.is_deep_derivable ().to_string ());

// Output: ``false``
type = typeof (Enum);
print (" is-deep-derivable: %s\n", type.is_deep_derivable ().to_string ());

return 0;
}

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



2022 vala-language.org