Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class CBModel {}
- class MyModel: CBModel {}
- class BaseDao<Model: CBModel> {
- var items: [Model] = []
- required init() {
- }
- }
- class NewsDao: BaseDao<MyModel> {
- required init() {
- super.init()
- }
- }
- class TableDataSource: NSObject {}
- class TableDataSourceWithRealmDao<Model: CBModel, Dao: BaseDao<Model>>: TableDataSource {
- private var dao: Dao
- init(koko: String) {
- self.dao = Dao.init()
- super.init()
- }
- }
- let datasource = TableDataSourceWithRealmDao<MyModel, NewsDao>(koko: "")
- print(datasource)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement