Ruminate
Type introspection for C
 All Classes Files Functions Enumerations Enumerator Macros Pages
RType Struct Reference

An opaque struct representing a type. More...

Inheritance diagram for RType:
Inheritance graph

Public Member Functions

RTypeId r_type_id (RType *type, GError **error)
 Get the type identifier of this type. More...
 
RStringr_type_name (RType *type, GError **error)
 Get the name of this type. More...
 
RTyper_type_ref (RType *type)
 Increase the reference count of this type. More...
 
void r_type_unref (RType *type)
 Decrease the reference count of this. More...
 
RTyper_type_pointer (RType *type, GError **error)
 Get an RType representing a pointer to this type. More...
 

Detailed Description

An opaque struct representing a type.

This type can be safely cast to it's sub-type which can be determined using r_type_id().

Member Function Documentation

RTypeId r_type_id ( RType type,
GError **  error 
)

Get the type identifier of this type.

The RTypeId of this RType represents the child type of this RType, and can be safely cast into that child type.

Returns
the child type of this type.
Parameters
[in]typethe type to retrieve the type id of
[out]errorsee errors.h
RString * r_type_name ( RType type,
GError **  error 
)

Get the name of this type.

Returns
an RString containing the name of this type.
Parameters
[in]typethe type to retrieve the name of
[out]errorsee errors.h
RType * r_type_pointer ( RType type,
GError **  error 
)

Get an RType representing a pointer to this type.

Returns
An RType representing a pointer to type.
Parameters
[in]typethe type to get a pointer to
[out]errorsee errors.h
RType * r_type_ref ( RType type)

Increase the reference count of this type.

Returns
type
Parameters
[in]typethe type to increase the reference count of
void r_type_unref ( RType type)

Decrease the reference count of this.

This RType will be freed if the reference count drops to zero.

Parameters
[in]typethe type to decrease the reference count of

The documentation for this struct was generated from the following file: