12
12
13
13
public enum _PrintForDebugger {
14
14
15
- enum CollectionStatus {
15
+ internal enum CollectionStatus {
16
16
case NotACollection
17
17
case CollectionOfElements
18
18
case CollectionOfPairs
19
19
case Element
20
20
case Pair
21
21
case ElementOfPair
22
22
23
- var isCollection : Bool {
23
+ internal var isCollection : Bool {
24
24
return self != . NotACollection
25
25
}
26
26
27
- func getChildStatus( child: Mirror ) -> CollectionStatus {
27
+ internal func getChildStatus( child: Mirror ) -> CollectionStatus {
28
28
let disposition = child. displayStyle ?? . struct
29
29
30
30
if disposition == . collection { return . CollectionOfElements }
@@ -39,23 +39,23 @@ public enum _PrintForDebugger {
39
39
}
40
40
}
41
41
42
- static func asObjectIdentifier( value: Any ) -> ObjectIdentifier ? {
42
+ internal static func asObjectIdentifier( value: Any ) -> ObjectIdentifier ? {
43
43
if let ao = value as? AnyObject {
44
44
return ObjectIdentifier ( ao)
45
45
} else {
46
46
return nil
47
47
}
48
48
}
49
49
50
- static func asNumericValue( value: Any ) -> Int {
50
+ internal static func asNumericValue( value: Any ) -> Int {
51
51
if let ao = value as? AnyObject {
52
52
return unsafeBitCast ( ao, to: Int . self)
53
53
} else {
54
54
return 0
55
55
}
56
56
}
57
57
58
- static func asStringRepresentation(
58
+ internal static func asStringRepresentation(
59
59
value: Any ? ,
60
60
mirror: Mirror ,
61
61
count: Int ) -> String ? {
@@ -113,7 +113,7 @@ public enum _PrintForDebugger {
113
113
return nil
114
114
}
115
115
116
- static func ivarCount( mirror: Mirror ) -> Int {
116
+ internal static func ivarCount( mirror: Mirror ) -> Int {
117
117
let count = Int ( mirror. children. count)
118
118
if let sc = mirror. superclassMirror {
119
119
return ivarCount ( mirror: sc) + count
@@ -123,7 +123,7 @@ public enum _PrintForDebugger {
123
123
}
124
124
125
125
126
- static func shouldExpand(
126
+ internal static func shouldExpand(
127
127
mirror: Mirror ,
128
128
collectionStatus: CollectionStatus ,
129
129
isRoot: Bool ) -> Bool {
@@ -137,7 +137,7 @@ public enum _PrintForDebugger {
137
137
}
138
138
}
139
139
140
- static func printForDebuggerImpl< StreamType: OutputStream > (
140
+ internal static func printForDebuggerImpl< StreamType: OutputStream > (
141
141
value: Any ? ,
142
142
mirror: Mirror ,
143
143
name: String ? ,
@@ -280,7 +280,7 @@ public enum _PrintForDebugger {
280
280
maxItemCounter: & maxItemCounter,
281
281
targetStream: & targetStream)
282
282
283
- return targetStream. data
283
+ return targetStream
284
284
}
285
285
}
286
286
0 commit comments