Top |
Functions
Description
GIUnionInfo 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.
Functions
g_union_info_get_n_fields ()
gint
g_union_info_get_n_fields (GIUnionInfo *info
);
Obtain the number of fields this union has.
g_union_info_get_field ()
GIFieldInfo * g_union_info_get_field (GIUnionInfo *info
,gint n
);
Obtain the type information for field with specified index.
g_union_info_get_n_methods ()
gint
g_union_info_get_n_methods (GIUnionInfo *info
);
Obtain the number of methods this union has.
g_union_info_get_method ()
GIFunctionInfo * g_union_info_get_method (GIUnionInfo *info
,gint n
);
Obtain the type information for method with specified index.
g_union_info_is_discriminated ()
gboolean
g_union_info_is_discriminated (GIUnionInfo *info
);
Return true if this union contains discriminator field.
g_union_info_get_discriminator_offset ()
gint
g_union_info_get_discriminator_offset (GIUnionInfo *info
);
Returns offset of the discriminator field in the structure.
g_union_info_get_discriminator_type ()
GITypeInfo *
g_union_info_get_discriminator_type (GIUnionInfo *info
);
Obtain the type information of the union discriminator.
g_union_info_get_discriminator ()
GIConstantInfo * g_union_info_get_discriminator (GIUnionInfo *info
,gint n
);
Obtain discriminator value assigned for n-th union field, i.e. n-th union field is the active one if discriminator contains this constant.
g_union_info_find_method ()
GIFunctionInfo * g_union_info_find_method (GIUnionInfo *info
,const gchar *name
);
Obtain the type information for method named name
.
g_union_info_get_size ()
gsize
g_union_info_get_size (GIUnionInfo *info
);
Obtain the total size of the union.
g_union_info_get_alignment ()
gsize
g_union_info_get_alignment (GIUnionInfo *info
);
Obtain the required alignment of the union.