Skip to content

Commit 08f18d3

Browse files
committed
Rename TypedObject to HighLevelObject
1 parent 2d4959c commit 08f18d3

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Sources/SwiftBuildSupport/PIF.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public enum PIF {
6060
}
6161
}
6262

63-
/// Represents a top-level PIF object container (i.e., has a `type` and an optional `signature`).
63+
/// Represents a high-level PIF object.
6464
///
6565
/// For instance, a JSON serialized *workspace* might look like this:
6666
/// ```json
@@ -78,7 +78,7 @@ public enum PIF {
7878
/// }
7979
/// }
8080
/// ```
81-
public class TypedObject: Codable {
81+
public class HighLevelObject: Codable {
8282
class var type: String {
8383
fatalError("\(self) missing implementation")
8484
}
@@ -105,7 +105,7 @@ public enum PIF {
105105
}
106106
}
107107

108-
public final class Workspace: TypedObject {
108+
public final class Workspace: HighLevelObject {
109109
override class var type: String { "workspace" }
110110

111111
public let guid: GUID
@@ -132,7 +132,7 @@ public enum PIF {
132132

133133
public override func encode(to encoder: Encoder) throws {
134134
try super.encode(to: encoder)
135-
var superContainer = encoder.container(keyedBy: TypedObject.CodingKeys.self)
135+
var superContainer = encoder.container(keyedBy: HighLevelObject.CodingKeys.self)
136136
var contents = superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: .contents)
137137
try contents.encode("\(guid)@\(schemaVersion)", forKey: .guid)
138138
try contents.encode(name, forKey: .name)
@@ -150,7 +150,7 @@ public enum PIF {
150150
}
151151

152152
public required init(from decoder: Decoder) throws {
153-
let superContainer = try decoder.container(keyedBy: TypedObject.CodingKeys.self)
153+
let superContainer = try decoder.container(keyedBy: HighLevelObject.CodingKeys.self)
154154
let contents = try superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: .contents)
155155

156156
let guidString = try contents.decode(GUID.self, forKey: .guid)
@@ -164,7 +164,7 @@ public enum PIF {
164164

165165
/// A PIF project, consisting of a tree of groups and file references, a list of targets, and some additional
166166
/// information.
167-
public final class Project: TypedObject {
167+
public final class Project: HighLevelObject {
168168
override class var type: String { "project" }
169169

170170
public let guid: GUID
@@ -210,7 +210,7 @@ public enum PIF {
210210

211211
public override func encode(to encoder: Encoder) throws {
212212
try super.encode(to: encoder)
213-
var superContainer = encoder.container(keyedBy: TypedObject.CodingKeys.self)
213+
var superContainer = encoder.container(keyedBy: HighLevelObject.CodingKeys.self)
214214
var contents = superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: .contents)
215215
try contents.encode("\(guid)@\(schemaVersion)", forKey: .guid)
216216
try contents.encode(name, forKey: .projectName)
@@ -235,7 +235,7 @@ public enum PIF {
235235
}
236236

237237
public required init(from decoder: Decoder) throws {
238-
let superContainer = try decoder.container(keyedBy: TypedObject.CodingKeys.self)
238+
let superContainer = try decoder.container(keyedBy: HighLevelObject.CodingKeys.self)
239239
let contents = try superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: .contents)
240240

241241
let guidString = try contents.decode(GUID.self, forKey: .guid)
@@ -266,7 +266,7 @@ public enum PIF {
266266
}
267267

268268
/// Abstract base class for all items in the group hierarchy.
269-
public class Reference: TypedObject {
269+
public class Reference: HighLevelObject {
270270
/// Determines the base path for a reference's relative path.
271271
public enum SourceTree: String, Codable {
272272

@@ -406,7 +406,7 @@ public enum PIF {
406406
public required init(from decoder: Decoder) throws {
407407
let container = try decoder.container(keyedBy: CodingKeys.self)
408408

409-
let untypedChildren = try container.decode([TypedObject].self, forKey: .children)
409+
let untypedChildren = try container.decode([HighLevelObject].self, forKey: .children)
410410
var childrenContainer = try container.nestedUnkeyedContainer(forKey: .children)
411411

412412
self.children = try untypedChildren.map { child in
@@ -459,7 +459,7 @@ public enum PIF {
459459
}
460460
}
461461

462-
public class BaseTarget: TypedObject {
462+
public class BaseTarget: HighLevelObject {
463463
class override var type: String { "target" }
464464
public let guid: GUID
465465
public var name: String
@@ -519,7 +519,7 @@ public enum PIF {
519519

520520
public override func encode(to encoder: Encoder) throws {
521521
try super.encode(to: encoder)
522-
var superContainer = encoder.container(keyedBy: TypedObject.CodingKeys.self)
522+
var superContainer = encoder.container(keyedBy: HighLevelObject.CodingKeys.self)
523523
var contents = superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: .contents)
524524
try contents.encode("aggregate", forKey: .type)
525525
try contents.encode("\(guid)@\(schemaVersion)", forKey: .guid)
@@ -538,7 +538,7 @@ public enum PIF {
538538
}
539539

540540
public required init(from decoder: Decoder) throws {
541-
let superContainer = try decoder.container(keyedBy: TypedObject.CodingKeys.self)
541+
let superContainer = try decoder.container(keyedBy: HighLevelObject.CodingKeys.self)
542542
let contents = try superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: .contents)
543543

544544
let guidString = try contents.decode(GUID.self, forKey: .guid)
@@ -547,7 +547,7 @@ public enum PIF {
547547
let name = try contents.decode(String.self, forKey: .name)
548548
let buildConfigurations = try contents.decode([BuildConfiguration].self, forKey: .buildConfigurations)
549549

550-
let untypedBuildPhases = try contents.decode([TypedObject].self, forKey: .buildPhases)
550+
let untypedBuildPhases = try contents.decode([HighLevelObject].self, forKey: .buildPhases)
551551
var buildPhasesContainer = try contents.nestedUnkeyedContainer(forKey: .buildPhases)
552552

553553
let buildPhases: [BuildPhase] = try untypedBuildPhases.map {
@@ -619,7 +619,7 @@ public enum PIF {
619619

620620
override public func encode(to encoder: Encoder) throws {
621621
try super.encode(to: encoder)
622-
var superContainer = encoder.container(keyedBy: TypedObject.CodingKeys.self)
622+
var superContainer = encoder.container(keyedBy: HighLevelObject.CodingKeys.self)
623623
var contents = superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: .contents)
624624
try contents.encode("\(guid)@\(schemaVersion)", forKey: .guid)
625625
try contents.encode(name, forKey: .name)
@@ -658,7 +658,7 @@ public enum PIF {
658658
}
659659

660660
public required init(from decoder: Decoder) throws {
661-
let superContainer = try decoder.container(keyedBy: TypedObject.CodingKeys.self)
661+
let superContainer = try decoder.container(keyedBy: HighLevelObject.CodingKeys.self)
662662
let contents = try superContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: .contents)
663663

664664
let guidString = try contents.decode(GUID.self, forKey: .guid)
@@ -684,7 +684,7 @@ public enum PIF {
684684
let productReference = try contents.decode([String: String].self, forKey: .productReference)
685685
self.productName = productReference["name"]!
686686

687-
let untypedBuildPhases = try contents.decodeIfPresent([TypedObject].self, forKey: .buildPhases) ?? []
687+
let untypedBuildPhases = try contents.decodeIfPresent([HighLevelObject].self, forKey: .buildPhases) ?? []
688688
var buildPhasesContainer = try contents.nestedUnkeyedContainer(forKey: .buildPhases)
689689

690690
buildPhases = try untypedBuildPhases.map {
@@ -712,7 +712,7 @@ public enum PIF {
712712
}
713713

714714
/// Abstract base class for all build phases in a target.
715-
public class BuildPhase: TypedObject {
715+
public class BuildPhase: HighLevelObject {
716716
static func decode(container: inout UnkeyedDecodingContainer, type: String) throws -> BuildPhase {
717717
switch type {
718718
case HeadersBuildPhase.type:

0 commit comments

Comments
 (0)