Documentation Language: Swift

Class

GIR.Argument

data type representing a function/method argument or return type

class Argument

Topics

Initializers

Instance Properties

V
allowNone

is this a parameter that can be ommitted?

V
argumentTypeName

return the swift (known) type of the receiver when passed as an argument

V
callbackArgumentTypeName

return the swift (known) type of the receiver when passed as an argument for a @convention(c) callback

V
callerAllocates

is this a caller-allocated (out) parameter?

V
defaultRefTemplateTypeName

return the swift (known) type of the receiver when passed as an argument Returns a reference name in case of a known record with a default value

V
direction

whether this is an in, out, or inout parameter

V
instance

is this an instance parameter or return type?

V
isNullable

is this a nullable parameter or return type?

V
isOptional

is this an optional (out) parameter?

V
kind

String representation of the CType thing

V
nonNullableTemplateDecl

Return a Swift template declaration for a known record that is non-nullable, or nil otherwise

V
ownershipTransfer

model of ownership transfer used

V
templateTypeName

return the swift (known) type of the receiver when passed as an argument Returns a template name in case of a known record

V
varargs

indicate whether the given parameter is varargs

Instance Methods

F
optionalIfNullable(_:)

Append a question mark if the receiver is nullable

F
optionalIfNullableOrOptional(_:)

Append a question mark if the receiver is nullable or optional

F
templateName(for:)

Return the name of a templated type correspondingg to a given record

Relationships

Inherits From

Inherited By

Conforms To

See Also

GIR element models

C
GIR.Thing

GIR named thing class

C
GIR.Datatype

GIR type class

C
GIR.CType

a type with an underlying C type entry

C
GIR.Alias

a type alias is just a type with an underlying C type

C
GIR.Bitfield

a bitfield is defined akin to an enumeration

C
GIR.Callback

a callback is the same as a function, except that the type definition is a @convention(c) callback definition

C
GIR.Class

a class data type record

C
GIR.Constant

an entry for a constant

C
GIR.Enumeration

an enumeration entry

C
GIR.Field

a field is a Property

C
GIR.Function

a function is the same as a method

C
GIR.Interface

an inteface is similar to a class, but can be part of a more complex type graph

C
GIR.Method

data type representing a function/method

C
GIR.Property

a property is a C type

C
GIR.Record

a data type record to create a protocol/struct/class for