@@ -60,7 +60,7 @@ public enum PIF {
60
60
}
61
61
}
62
62
63
- /// Represents a top -level PIF object container (i.e., has a `type` and an optional `signature`) .
63
+ /// Represents a high -level PIF object.
64
64
///
65
65
/// For instance, a JSON serialized *workspace* might look like this:
66
66
/// ```json
@@ -78,7 +78,7 @@ public enum PIF {
78
78
/// }
79
79
/// }
80
80
/// ```
81
- public class TypedObject : Codable {
81
+ public class HighLevelObject : Codable {
82
82
class var type : String {
83
83
fatalError ( " \( self ) missing implementation " )
84
84
}
@@ -105,7 +105,7 @@ public enum PIF {
105
105
}
106
106
}
107
107
108
- public final class Workspace : TypedObject {
108
+ public final class Workspace : HighLevelObject {
109
109
override class var type : String { " workspace " }
110
110
111
111
public let guid : GUID
@@ -132,7 +132,7 @@ public enum PIF {
132
132
133
133
public override func encode( to encoder: Encoder ) throws {
134
134
try super. encode ( to: encoder)
135
- var superContainer = encoder. container ( keyedBy: TypedObject . CodingKeys. self)
135
+ var superContainer = encoder. container ( keyedBy: HighLevelObject . CodingKeys. self)
136
136
var contents = superContainer. nestedContainer ( keyedBy: CodingKeys . self, forKey: . contents)
137
137
try contents. encode ( " \( guid) @ \( schemaVersion) " , forKey: . guid)
138
138
try contents. encode ( name, forKey: . name)
@@ -150,7 +150,7 @@ public enum PIF {
150
150
}
151
151
152
152
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)
154
154
let contents = try superContainer. nestedContainer ( keyedBy: CodingKeys . self, forKey: . contents)
155
155
156
156
let guidString = try contents. decode ( GUID . self, forKey: . guid)
@@ -164,7 +164,7 @@ public enum PIF {
164
164
165
165
/// A PIF project, consisting of a tree of groups and file references, a list of targets, and some additional
166
166
/// information.
167
- public final class Project : TypedObject {
167
+ public final class Project : HighLevelObject {
168
168
override class var type : String { " project " }
169
169
170
170
public let guid : GUID
@@ -210,7 +210,7 @@ public enum PIF {
210
210
211
211
public override func encode( to encoder: Encoder ) throws {
212
212
try super. encode ( to: encoder)
213
- var superContainer = encoder. container ( keyedBy: TypedObject . CodingKeys. self)
213
+ var superContainer = encoder. container ( keyedBy: HighLevelObject . CodingKeys. self)
214
214
var contents = superContainer. nestedContainer ( keyedBy: CodingKeys . self, forKey: . contents)
215
215
try contents. encode ( " \( guid) @ \( schemaVersion) " , forKey: . guid)
216
216
try contents. encode ( name, forKey: . projectName)
@@ -235,7 +235,7 @@ public enum PIF {
235
235
}
236
236
237
237
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)
239
239
let contents = try superContainer. nestedContainer ( keyedBy: CodingKeys . self, forKey: . contents)
240
240
241
241
let guidString = try contents. decode ( GUID . self, forKey: . guid)
@@ -266,7 +266,7 @@ public enum PIF {
266
266
}
267
267
268
268
/// Abstract base class for all items in the group hierarchy.
269
- public class Reference : TypedObject {
269
+ public class Reference : HighLevelObject {
270
270
/// Determines the base path for a reference's relative path.
271
271
public enum SourceTree : String , Codable {
272
272
@@ -406,7 +406,7 @@ public enum PIF {
406
406
public required init ( from decoder: Decoder ) throws {
407
407
let container = try decoder. container ( keyedBy: CodingKeys . self)
408
408
409
- let untypedChildren = try container. decode ( [ TypedObject ] . self, forKey: . children)
409
+ let untypedChildren = try container. decode ( [ HighLevelObject ] . self, forKey: . children)
410
410
var childrenContainer = try container. nestedUnkeyedContainer ( forKey: . children)
411
411
412
412
self . children = try untypedChildren. map { child in
@@ -459,7 +459,7 @@ public enum PIF {
459
459
}
460
460
}
461
461
462
- public class BaseTarget : TypedObject {
462
+ public class BaseTarget : HighLevelObject {
463
463
class override var type : String { " target " }
464
464
public let guid : GUID
465
465
public var name : String
@@ -519,7 +519,7 @@ public enum PIF {
519
519
520
520
public override func encode( to encoder: Encoder ) throws {
521
521
try super. encode ( to: encoder)
522
- var superContainer = encoder. container ( keyedBy: TypedObject . CodingKeys. self)
522
+ var superContainer = encoder. container ( keyedBy: HighLevelObject . CodingKeys. self)
523
523
var contents = superContainer. nestedContainer ( keyedBy: CodingKeys . self, forKey: . contents)
524
524
try contents. encode ( " aggregate " , forKey: . type)
525
525
try contents. encode ( " \( guid) @ \( schemaVersion) " , forKey: . guid)
@@ -538,7 +538,7 @@ public enum PIF {
538
538
}
539
539
540
540
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)
542
542
let contents = try superContainer. nestedContainer ( keyedBy: CodingKeys . self, forKey: . contents)
543
543
544
544
let guidString = try contents. decode ( GUID . self, forKey: . guid)
@@ -547,7 +547,7 @@ public enum PIF {
547
547
let name = try contents. decode ( String . self, forKey: . name)
548
548
let buildConfigurations = try contents. decode ( [ BuildConfiguration ] . self, forKey: . buildConfigurations)
549
549
550
- let untypedBuildPhases = try contents. decode ( [ TypedObject ] . self, forKey: . buildPhases)
550
+ let untypedBuildPhases = try contents. decode ( [ HighLevelObject ] . self, forKey: . buildPhases)
551
551
var buildPhasesContainer = try contents. nestedUnkeyedContainer ( forKey: . buildPhases)
552
552
553
553
let buildPhases : [ BuildPhase ] = try untypedBuildPhases. map {
@@ -619,7 +619,7 @@ public enum PIF {
619
619
620
620
override public func encode( to encoder: Encoder ) throws {
621
621
try super. encode ( to: encoder)
622
- var superContainer = encoder. container ( keyedBy: TypedObject . CodingKeys. self)
622
+ var superContainer = encoder. container ( keyedBy: HighLevelObject . CodingKeys. self)
623
623
var contents = superContainer. nestedContainer ( keyedBy: CodingKeys . self, forKey: . contents)
624
624
try contents. encode ( " \( guid) @ \( schemaVersion) " , forKey: . guid)
625
625
try contents. encode ( name, forKey: . name)
@@ -658,7 +658,7 @@ public enum PIF {
658
658
}
659
659
660
660
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)
662
662
let contents = try superContainer. nestedContainer ( keyedBy: CodingKeys . self, forKey: . contents)
663
663
664
664
let guidString = try contents. decode ( GUID . self, forKey: . guid)
@@ -684,7 +684,7 @@ public enum PIF {
684
684
let productReference = try contents. decode ( [ String : String ] . self, forKey: . productReference)
685
685
self . productName = productReference [ " name " ] !
686
686
687
- let untypedBuildPhases = try contents. decodeIfPresent ( [ TypedObject ] . self, forKey: . buildPhases) ?? [ ]
687
+ let untypedBuildPhases = try contents. decodeIfPresent ( [ HighLevelObject ] . self, forKey: . buildPhases) ?? [ ]
688
688
var buildPhasesContainer = try contents. nestedUnkeyedContainer ( forKey: . buildPhases)
689
689
690
690
buildPhases = try untypedBuildPhases. map {
@@ -712,7 +712,7 @@ public enum PIF {
712
712
}
713
713
714
714
/// Abstract base class for all build phases in a target.
715
- public class BuildPhase : TypedObject {
715
+ public class BuildPhase : HighLevelObject {
716
716
static func decode( container: inout UnkeyedDecodingContainer , type: String ) throws -> BuildPhase {
717
717
switch type {
718
718
case HeadersBuildPhase . type:
0 commit comments