 //  gir2swift
 //
 //  Created by Rene Hexel on 2/04/2016.
-//  Copyright © 2016, 2017, 2018, 2019, 2020 Rene Hexel. All rights reserved.
+//  Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Rene Hexel. All rights reserved.
 //
 import Foundation
 


            // This code will consume floating references upon instantiation. This is suggested by the GObject documentation since Floating references are C-specific syntactic sugar.
            // https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html
            let retainBlock = isGObject == true 
                ? doubleIndent + "if typeIsA(type: \(factory ? "rv" : "self").type, isAType: InitiallyUnownedClassRef.metatypeReference) { _ = \(factory ? "rv" : "self").refSink() } \n" 
                : "" 

            let code = swiftCode(method, indentation + "\(deprecated)@inlinable \(publicDesignation)\(fact)" +

    "@inlinable func set(property: \(className)PropertyName, value v: GLibObject.Value) {\n" + doubleIndentation +
        "g_object_set_property(ptr.assumingMemoryBound(to: GObject.self), property.rawValue, v.value_ptr)\n" + indentation +
    "}\n}\n\n"))
    let signalEnumCode = (noSignals ? "// MARK: no \(className) signals\n\n" : "public enum \(className)SignalName: String, SignalNameProtocol {\n" +
    //        "public typealias Class = \(protocolName)\n") +
        signals.map(scode).joined(separator: "\n") + "\n" +
        properties.map(ncode).joined(separator: "\n") + "\n}\n\n")
    return code1 + code2 + code3 + signalEnumCode + buildSignalExtension(for: e)
}

// MARK: - Swift code for Record/Class methods
