RecordType
public struct RecordType: ClangTypeBacked
MARK: Special Types
-
Computes the offset of a named field in a record of the given type in bytes as it would be returned by offsetof as per C++11[18.2p4]
Throws
TypeLayoutError.invalidif the type declaration is not a record field.TypeLayoutError.incompleteif the type declaration is an incomplete typeTypeLayoutError.dependentif the type declaration is dependentTypeLayoutError.invalidFieldNameif the field is not found in the receiving type.
Declaration
Swift
public func offsetOf(fieldName: String) throws -> IntReturn Value
The offset of a field with the given name in the type.
-
Gathers and returns all the fields of this record.
Declaration
Swift
public func fields() -> [Cursor]
RecordType Structure Reference