0001 // 0002 // BooleanDisposable.swift 0003 // Rx 0004 // 0005 // Created by Junior B. on 10/29/15. 0006 // Copyright © 2015 Krunoslav Zaher. All rights reserved. 0007 // 0008 0009 import Foundation 0010 0011 /** 0012 Represents a disposable resource that can be checked for disposal status. 0013 */ 0014 public class BooleanDisposable: Disposable, Cancelable { 0015 0016 internal static let BooleanDisposableTrue = BooleanDisposable(disposed: true) 0017 private var _disposed
BooleanDisposable.swift:16 internal static let BooleanDisposableTrue = BooleanDisposable(disposed: true)= false 0018 0019 /** 0020 Initializes a new instance of the `BooleanDisposable` class 0021 */ 0022 public init() { 0023 } 0024 0025 /** 0026 Initializes a new instance of the `BooleanDisposable` class with given value 0027 */ 0028 public init
BooleanDisposable.swift:29 self._disposed = disposedBooleanDisposable.swift:37 return _disposedBooleanDisposable.swift:45 _disposed = true(disposed: Bool) { 0029 self._disposed = disposed 0030 } 0031 0032 /** 0033 - returns: Was resource disposed. 0034 */ 0035 public var disposed: Bool { 0036 get { 0037 return _disposed 0038 } 0039 } 0040 0041 /** 0042 Sets the status to disposed, which can be observer through the `disposed` property. 0043 */ 0044 public func dispose() { 0045 _disposed = true 0046 } 0047 }
BooleanDisposable.swift:16 internal static let BooleanDisposableTrue = BooleanDisposable(disposed: true)