added iOS source code
[wl-app.git] / iOS / Pods / FolioReaderKit / Source / EPUBCore / FRTocReference.swift
1 //
2 //  FRTocReference.swift
3 //  FolioReaderKit
4 //
5 //  Created by Heberti Almeida on 06/05/15.
6 //  Copyright (c) 2015 Folio Reader. All rights reserved.
7 //
8
9 import UIKit
10
11 open class FRTocReference: NSObject {
12     var children: [FRTocReference]!
13
14     public var title: String!
15     public var resource: FRResource?
16     public var fragmentID: String?
17     
18     convenience init(title: String, resource: FRResource?, fragmentID: String = "") {
19         self.init(title: title, resource: resource, fragmentID: fragmentID, children: [FRTocReference]())
20     }
21
22     init(title: String, resource: FRResource?, fragmentID: String, children: [FRTocReference]) {
23         self.resource = resource
24         self.title = title
25         self.fragmentID = fragmentID
26         self.children = children
27     }
28 }
29
30 // MARK: Equatable
31
32 func ==(lhs: FRTocReference, rhs: FRTocReference) -> Bool {
33     return lhs.title == rhs.title && lhs.fragmentID == rhs.fragmentID
34 }