Documentation Language: Swift

Method

cast(expression:to:pointerLevel:const:isConstSource:)

Return the default cast to convert the given expression to the target type

func cast(expression: String, to target: GIRType, pointerLevel: Int = 0, const: Bool = false, isConstSource: Bool = false) -> String

Parameters

expression

The expression to cast

target

The target type to cast to

pointerLevel

The number of indirection levels (pointers)

const

An indicator whether the cast is to a const value

isConstSource

An indicator whether the source expression is a const value

Return Value

The cast expression string