SKBaseEntity
open class SKBaseEntity : NSObject, SKSequence
Represents a structure of symbols (a class has its methods as sub-entities, etc.).
This includes the function parameters and their types as entities. Each entity refers to the range of the
original text via offset + length
entries.
-
Undocumented
See moreDeclaration
Swift
public enum CodingKeys : String, CodingKey
-
Undocumented
Declaration
Swift
public typealias Kind = SKDeclarationKind
-
Undocumented
Declaration
Swift
public typealias Inherit = SKInherit
-
Undocumented
Declaration
Swift
public typealias GenericRequirement = SKGenericRequirement
-
Undocumented
Declaration
Swift
public typealias GenericParameter = SKGenericParameter
-
Undocumented
Declaration
Swift
public typealias DecodingContainer = KeyedDecodingContainer<CodingKeys>
-
The UID for the declaration or reference kind (function, class, etc.).
Declaration
Swift
public let kind: Kind
-
The displayed name for the entity.
Declaration
Swift
public let name: String?
-
The keyword identifying the entity.
Declaration
Swift
public let keyword: String?
-
The Unified Symbol Resolution (USR) string for the entity.
Declaration
Swift
public let usr: String?
-
the byte location of the entity.
Declaration
Swift
public let offset: Offset?
-
The byte length of the entity.
Declaration
Swift
public let length: Int?
-
The XML representing the entity, its Unified Symbol Resolution (USR), etc.
Declaration
Swift
public let fullyAnnotatedDeclaration: String?
-
The XML representing the entity and its documentation.
Note
Only present when the entity is documented.Declaration
Swift
public let docFullAsXML: String?
-
The entities the entity inherits from.
Declaration
Swift
public let inherits: [Inherit]?
-
The entity’s generic requirements.
Declaration
Swift
public let genericRequirements: [GenericRequirement]?
-
The entity’s generic parameters.
Declaration
Swift
public let genericParameters: [GenericParameter]?
-
Declaration
Swift
public var index: Int?
-
Declaration
Swift
public var filePath: String?
-
Declaration
Swift
public weak var internalParent: SKBaseEntity?
-
Declaration
Swift
public var internalChildren: [SKBaseEntity]?
-
Declaration
Swift
required public init(from decoder: Decoder) throws
-
Declaration
Swift
open class func iteratorClass<Entity>() -> SKPreOrderDFSIterator<Entity>.Type where Entity : SKSequence
-
A convenience method for decoding children entities of a specified type from a decoding container.
Throws
ADecodingError
.Declaration
Swift
public func decodeChildren<Entity: SKBaseEntity>(_ type: Entity.Type, from container: DecodingContainer) throws -> [Entity]?
Parameters
type
The child type.
container
The decoding container.
Return Value
The children substructures decoded as a specified type.
-
Decodes the children entities from a decoding container.
If using a
SKBaseEntity
subclass, override this method and return the decoded children entities by callingdecodeChildren(_:from:)
with the respective subclass.For example:
override public func decodeChildren(from container: DecodingContainer) throws -> [SKBaseEntity]? { return try decodeChildren(MyEntitySubclass.self, from: container) }
Throws
ADecodingError
.Declaration
Swift
open func decodeChildren(from container: DecodingContainer) throws -> [SKBaseEntity]?
Parameters
container
The decoding container.
Return Value
The children entities decoded as a specified type.
-
Undocumented
Declaration
Swift
open override func isEqual(_ object: Any?) -> Bool