pub unsafe extern "C" fn object_class_dynamic_cast(
    klass: *mut ObjectClass,
    typename: *const c_char
) -> *mut ObjectClass
Expand description

object_class_dynamic_cast: @klass: The #ObjectClass to attempt to cast. @typename: The QOM typename of the class to cast to.

Returns: If @typename is a class, this function returns @klass if @typename is a subtype of @klass, else returns #NULL.

If @typename is an interface, this function returns the interface definition for @klass if @klass implements it unambiguously; #NULL is returned if @klass does not implement the interface or if multiple classes or interfaces on the hierarchy leading to @klass implement it. (FIXME: perhaps this can be detected at type definition time?)