Structure
TypeReference
Reference to a GIR type.
struct TypeReference
Topics
Initializers
Designated initialiser for a type reference
Instance Properties
Array of pointers (true if they are const, false if they are mutable)
returns the force-unwrapped, full type name
returns the full C type including pointers and const
returns the full Swift type (e.g. class) including pointers and taking into account const
returns the full type including pointers and taking into account const
returns the full C type including pointers and taking into account const
The identifier of this instance
Return the idiomatic Swift type for a given type reference
The level of indirection, with 0 indicating the referenced type itself, 1 representing a pointer to an instance of the referenced type, 2 representing an array of pointers (or a pointer to a pointer), etc.
Whether or not the referenced type is an array
Whether or not the referenced type is const
Whether or not the referenced type is optional (nullable)
Returns true if the receiver is a reference to void
The level of indirection, taking into account known types such as gpointer with 0 indicating the referenced type itself, 1 representing a pointer to an instance of the referenced type, 2 representing an array of pointers (or a pointer to a pointer), etc.
Return an indirectionLevel offset if the type in question is a known pointer
The namespace for this instance
The type referenced
Return the underlying type (e.g. class or primitive C type) for a given type reference
Instance Methods
Cast from one type reference to another
Embed the given type in a layer of pointers as appropriate
Returns the full type including pointers and taking into account const
Test whether the receiver is an alias of the given type
Test whether the receiver is an alias of the given type reference
Test whether the receiver is a direct pointer to the given type reference
Test whether the receiver is a direct pointer to the given type
Test whether the receiver is a pointer at some level to the given type
Test whether the receiver is a pointer at some level to the given type reference
Test whether the receiver references the given type
Test whether the receiver references the given type reference
Type Properties
Reference to void type
Type Methods
Create a single-indirection pointer to a given target
Default Implementations
Relationships
Conforms To
See Also
Type system
Representation of a fundamental type, its relationship to other types, and casting operations
Representation of a string type, its relationship to other types, and casting operations
Representation of a raw pointer type, its relationship to other types, and casting operations
Representation of a record type (struct or class), its relationship to other types, and casting operations
Representation of a generic type (struct or class), its relationship to other types, and casting operations
Representation of a opaque pointer type, its relationship to other types, and casting operations
Type conversion operation. This root class is used for aliases/equal type conversions, i.e., casts are no-ops.
Parent/Child class conversion operation
Parent/Child class conversion operation with optional upcast
Custom type conversion operation
Nested type conversion operation
Enum type conversion operation.
Bit field (OptionSet) type conversion operation.