-
String representation of the
CTypethingDeclaration
Swift
public override var kind: String { get } -
underlying C type
Declaration
Swift
public let ctype: String -
list of contained types
Declaration
Swift
public let containedTypes: [CType] -
trueif this is an optionalDeclaration
Swift
public let nullable: Bool -
reference scope
Declaration
Swift
public let scope: String? -
Designated initialiser
Declaration
Swift
public init(name: String, type: String, ctype: String, comment: String, introspectable: Bool = false, deprecated: String? = nil, isNullable: Bool = false, contains: [CType] = [], scope: String? = nil)Parameters
nameThe name of the
Datatypeto initialisetypeC typedef name of the data type
ctypeunderlying C type
commentDocumentation text for the data type
introspectableSet to
trueif introspectabledeprecatedDocumentation on deprecation status if non-
nilisNullableSet to
trueif this is a nullable typecontainsArray of C types contained within this type
scopeThe scope this type belongs in
-
XML Element initialser
Declaration
Swift
public init(node: XMLElement, atIndex i: Int, nameAttr: String = "name", typeAttr: String = "type", cTypeAttr: String? = nil, nullableAttr: String = "nullable", scopeAttr: String = "scope")Parameters
nodeXMLElementto construct this C type fromiIndex within the siblings of the
nodenameAttrKey for the attribute to extract the
nameproperty fromtypeAttrKey for the attribute to extract the
typeproperty fromcTypeAttrKey for the attribute to extract the C type property from
nullableAttrKey for the attribute to extract the nullability status from
scopeAttrKey for the attribute to extract the scope string from
-
Factory method to construct a C Type from XML with types taken from children
Declaration
Swift
public init(fromChildrenOf node: XMLElement, atIndex i: Int, nameAttr: String = "name", typeAttr: String = "type", nullableAttr: String = "nullable", scopeAttr: String = "scope")Parameters
nodeXMLElementwhose descendants to construct this C type fromiIndex within the siblings of the
nodenameAttrKey for the attribute to extract the
nameproperty fromtypeAttrKey for the attribute to extract the
typeproperty fromnullableAttrKey for the attribute to extract the nullability status from
scopeAttrKey for the attribute to extract the scope string from
-
return whether the give C type is void
Declaration
Swift
override public var isVoid: Bool { get } -
return whether the type is an array
Declaration
Swift
public var isArray: Bool { get }
View on GitHub
Install in Dash
CType Class Reference