Enumeration

public class Enumeration : Datatype

an enumeration entry

  • String representation of Enumerations

    Declaration

    Swift

    public override var kind: String { get }
  • an enumeration value in C is a constant

    Declaration

    Swift

    public typealias Member = Constant
  • enumeration values

    Declaration

    Swift

    public let members: [Member]
  • Designated initialiser

    Declaration

    Swift

    public init(name: String, type: String, members: [Member], comment: String, introspectable: Bool = false, deprecated: String? = nil)

    Parameters

    name

    The name of the Enumeration to initialise

    type

    C typedef name of the enum

    members

    the cases for this enum

    comment

    Documentation text for the enum

    introspectable

    Set to true if introspectable

    deprecated

    Documentation on deprecation status if non-nil

  • Initialiser to construct an enumeration from XML

    Declaration

    Swift

    public init(node: XMLElement, atIndex i: Int)

    Parameters

    node

    XMLElement to construct this enum from

    i

    Index within the siblings of the node