allow public access to bridgeToObjectiveC and bridgeToSwift properties

This commit is contained in:
John Estropia
2016-03-28 19:07:35 +09:00
parent eda398d758
commit b0b0df2861
29 changed files with 528 additions and 469 deletions

View File

@@ -33,7 +33,7 @@ import CoreData
The `CSInMemoryStore` serves as the Objective-C bridging type for `InMemoryStore`.
*/
@objc
public final class CSInMemoryStore: NSObject, CSStorageInterface, CoreStoreBridge {
public final class CSInMemoryStore: NSObject, CSStorageInterface, CoreStoreObjectiveCType {
/**
Initializes a `CSInMemoryStore` for the specified configuration
@@ -70,7 +70,7 @@ public final class CSInMemoryStore: NSObject, CSStorageInterface, CoreStoreBridg
@objc
public var configuration: String? {
return self.swift.configuration
return self.bridgeToSwift.configuration
}
/**
@@ -79,7 +79,7 @@ public final class CSInMemoryStore: NSObject, CSStorageInterface, CoreStoreBridg
@objc
public var storeOptions: [String: AnyObject]? {
return self.swift.storeOptions
return self.bridgeToSwift.storeOptions
}
@@ -87,7 +87,7 @@ public final class CSInMemoryStore: NSObject, CSStorageInterface, CoreStoreBridg
public override var hash: Int {
return ObjectIdentifier(self.swift).hashValue
return ObjectIdentifier(self.bridgeToSwift).hashValue
}
public override func isEqual(object: AnyObject?) -> Bool {
@@ -96,17 +96,17 @@ public final class CSInMemoryStore: NSObject, CSStorageInterface, CoreStoreBridg
return false
}
return self.swift === object.swift
return self.bridgeToSwift === object.bridgeToSwift
}
// MARK: CoreStoreBridge
// MARK: CoreStoreObjectiveCType
internal let swift: InMemoryStore
public let bridgeToSwift: InMemoryStore
public required init(_ swiftObject: InMemoryStore) {
public required init(_ swiftValue: InMemoryStore) {
self.swift = swiftObject
self.bridgeToSwift = swiftValue
super.init()
}
}
@@ -114,9 +114,9 @@ public final class CSInMemoryStore: NSObject, CSStorageInterface, CoreStoreBridg
// MARK: - InMemoryStore
extension InMemoryStore: CoreStoreBridgeable {
extension InMemoryStore: CoreStoreSwiftType {
// MARK: CoreStoreBridgeable
// MARK: CoreStoreSwiftType
internal typealias ObjCType = CSInMemoryStore
public typealias ObjectiveCType = CSInMemoryStore
}