From c58aa5f78d244857b682bb0a1e44cc1100fcb13f Mon Sep 17 00:00:00 2001 From: p-x9 <50244599+p-x9@users.noreply.github.com> Date: Sun, 10 Nov 2024 04:10:40 +0900 Subject: [PATCH] Add doc comments to `PrebuiltLoaderProtocol` --- .../Loader/PrebuiltLoaderProtocol.swift | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Sources/MachOKit/Model/DyldCache/Loader/PrebuiltLoaderProtocol.swift b/Sources/MachOKit/Model/DyldCache/Loader/PrebuiltLoaderProtocol.swift index dafbe17..0f736d9 100644 --- a/Sources/MachOKit/Model/DyldCache/Loader/PrebuiltLoaderProtocol.swift +++ b/Sources/MachOKit/Model/DyldCache/Loader/PrebuiltLoaderProtocol.swift @@ -10,15 +10,32 @@ import Foundation public protocol PrebuiltLoaderProtocol { + /// Address where this loader is located. + /// + /// Slides after loading are not included. var address: Int { get } + /// magic of loader starts var magic: String? { get } + /// PrebuiltLoader vs JustInTimeLoader var isPrebuilt: Bool { get } var ref: LoaderRef { get } + /// path for target mach-o image + /// - Parameter cache: DyldCache to which `self` belongs + /// - Returns: path name func path(in cache: DyldCache) -> String? + /// loader reference list of target 's dependencies + /// - Parameter cache: DyldCache to which `self` belongs + /// - Returns: sequence of loader reference func dependentLoaderRefs(in cache: DyldCache) -> DataSequence? + /// path for target mach-o image + /// - Parameter cache: DyldCacheLoaded to which `self` belongs + /// - Returns: path name func path(in cache: DyldCacheLoaded) -> String? + /// loader reference list of target 's dependencies + /// - Parameter cache: DyldCacheLoaded to which `self` belongs + /// - Returns: sequence of loader reference func dependentLoaderRefs(in cache: DyldCacheLoaded) -> MemorySequence? }