You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
841 B
36 lines
841 B
// |
|
// ReuseIdentifierProtocol.swift |
|
// R.swift Library |
|
// |
|
// Created by Mathijs Kadijk on 06-12-15. |
|
// From: https://github.com/mac-cain13/R.swift.Library |
|
// License: MIT License |
|
// |
|
|
|
import Foundation |
|
|
|
/// Reuse identifier protocol |
|
public protocol ReuseIdentifierType: IdentifierType { |
|
/// Type of this reuseable |
|
associatedtype ReusableType |
|
} |
|
|
|
/// Reuse identifier |
|
public struct ReuseIdentifier<Reusable>: ReuseIdentifierType { |
|
/// Type of this reuseable |
|
public typealias ReusableType = Reusable |
|
|
|
/// String identifier of this reusable |
|
public let identifier: String |
|
|
|
/** |
|
Create a new ReuseIdentifier based on the string identifier |
|
|
|
- parameter identifier: The string identifier for this reusable |
|
|
|
- returns: A new ReuseIdentifier |
|
*/ |
|
public init(identifier: String) { |
|
self.identifier = identifier |
|
} |
|
}
|
|
|