MCMirror

open class MCMirror<T: MCRecordable>: MCMirrorAbstraction, ReachabilityChanger, ConnectivityChangeListener

This open (can be sub-classed) class serves as the primary concrete adopter of MCReceiverAbstraction. Gives access to an array of Recordable, and keeps that array matching database records.

  • db

    This read-only, constant property stores database records will be received from.

    Declaration

    Swift

    public let db: MCDatabase
  • This read-only, computed property returns unique string identifier for the receiver.

    Declaration

    Swift

    public let name = "MCR<\(type.self)> \(Date().timeIntervalSince1970)"
  • Receivers can only work with one type (for error handling).

    Declaration

    Swift

    public typealias type = T
  • This read-only, computed property returns a serial dispatch queue for local changes to recordables.

    Declaration

    Swift

    public var serialQ = DispatchQueue(label: "Receiver Q")
  • Changes made to this array will NOT be reflected to the cloud and NOT broadcast to other local receivers. Can still be observed using changeNotification property.

    Declaration

    Swift

    public var silentRecordables: [type] = [type]()
  • This property stores the CKQuerySubscription used by the receiver and should not be modified.

    Declaration

    Swift

    public var subscription: MCSubscriber
  • This open (can be sub-classed) class serves as the primary concrete adopter of MCReceiverAbstraction. Gives access to an array of Recordable, and keeps that array matching database records.

    Declaration

    Swift

    public init(db: MCDatabase)

    Parameters

    db

    An argument representing the database that receiver receives recordables from.