package gobject-introspection

  1. Overview
  2. Docs

Union_info — Module representing a C structure

type t

Union_info represents a union type. A union has methods and fields. Unions can optionally have a discriminator, which is a field deciding what type of real union fields is valid for specified instance.

val unioninfo : t Ctypes.structure Ctypes.typ
val get_n_fields : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of fields this union has.

val get_size : t Ctypes.structure Ctypes.ptr -> int

Obtain the total size of the union.

val get_alignment : t Ctypes.structure Ctypes.ptr -> int

Obtain the required alignment of the union.

val get_n_methods : t Ctypes.structure Ctypes.ptr -> int

Obtain the number of methods this union has.

Obtain the type information for field with specified index.

Obtain the type information for method with specified index.

Obtain the type information for method named name .

val is_discriminated : t Ctypes.structure Ctypes.ptr -> bool

Return true if this union contains discriminator field.

val get_discriminator_offset : t Ctypes.structure Ctypes.ptr -> int

Returns offset of the discriminator field in the structure.

Obtain the type information of the union discriminator.

Obtain discriminator value assigned for n-th union field, i.e. n-th union field is the active one if discriminator contains this constant.

Just cast OCaml Ctypes base info to union info.

Just cast OCaml Ctypes union info to base info

Return a Union_info.t from a Base_info.t, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Base_info.baseinfo_unref.

Return a Base_info.t form a Union_info, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Base_info.baseinfo_unref.

Just cast OCaml Ctypes registeredtype info to union info.

Just cast OCaml Ctypes union info to registeredtype info

Return a Union_info.t from a Registered_type_info.t, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Registered_type_info.registeredtypeinfo_unref.

Return a Registered_type_info.t form a Union_info, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Registered_type_info.registeredtypeinfo_unref.