Documentation Language: Swift

Method

knownCast(expression:from:pointerLevel:const:)

Return an explicitly known cast to convert the given expression to the target type

func knownCast(expression e: String, from source: GIRType, pointerLevel: Int = 0, const: Bool = false) -> String?

Parameters

e

The expression to cast

source

The source type to cast from

pointerLevel

The number of indirection levels (pointers)

const

An indicator whether the cast is to a const value

Return Value

The cast expression string, or nil if there is no way to cast from source