Function
recordProtocolExtensionCode(_:_:indentation:ptr:)
Default implementation for record methods as protocol extension.
func recordProtocolExtensionCode(_ globalFunctions: [GIR.Function], _ e: GIR.Record, indentation: String = " ", ptr ptrName: String = "ptr") -> String
Return Value
The Swift code for the default implementation of the record’s methods and properties.
Discussion
This function generates the default implementation code for the methods and properties of the given record.
-
globalFunctions: Global functions that might take the record as one of their parameters.
-
e: The record for which to generate the code.
-
indentation: The indentation (string of spaces) to use for the code.
-
ptrName: The name of the pointer property that points to the underlying C record.