Thing

public class Thing : Hashable, Comparable

GIR named thing class

  • String representation of the kind of Thing represented by the receiver

    Declaration

    Swift

    public var kind: String { get }
  • type name without namespace/prefix

    Declaration

    Swift

    public let name: String
  • documentation for the Thing

    Declaration

    Swift

    public let comment: String
  • Is this Thing introspectable?

    Declaration

    Swift

    public let introspectable: Bool
  • Alternative to use if deprecated

    Declaration

    Swift

    public let deprecated: String?
  • Is this Thing explicitly marked as deprecated?

    Declaration

    Swift

    public let markedAsDeprecated: Bool
  • Version the receiver is available from

    Declaration

    Swift

    public let version: String?
  • Hashes the essential components of this value by feeding them into the given hasher.

    This method is implemented to conform to the Hashable protocol. Calls hasher.combine(_:) with the name component.

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)

    Parameters

    hasher

    The hasher to use when combining the components of the receiver.

  • Memberwise initialiser

    Declaration

    Swift

    public init(name: String, comment: String, introspectable: Bool = false, deprecated: String? = nil, markedAsDeprecated: Bool = false, version: String? = nil)

    Parameters

    name

    The name of the Thing to initialise

    comment

    Documentation text for the Thing

    introspectable

    Set to true if introspectable

    deprecated

    Documentation on deprecation status if non-nil

    markedAsDeprecated

    Set to true if deprecated

    version

    The version this Thing is first available in

  • XML Element initialser

    Declaration

    Swift

    public init(node: XMLElement, atIndex i: Int, nameAttr: String = "name")

    Parameters

    node

    XMLElement to construct this Thing from

    i

    Index within the siblings of the node

    nameAttr

    Key for the attribute to extract the name property from

  • return a name with reserved Ref or Protocol suffixes escaped

    Declaration

    Swift

    var escapedName: String { get }
  • type name without ‘Private’ suffix (nil if public)

    Declaration

    Swift

    var priv: String? { get }
  • Type name without ‘Class’, ‘Iface’, etc. suffix

    Declaration

    Swift

    var node: String { get }